Skip to content

Custom Height Slider Question

So someone awesome here posted about how to add height sliders to neverwinter nights in coding yet im quite inpet at scripting/ coding. I believe this coding is based on variables but i dont know what exactly i do when the scripting doesnt compile

void main()
{
float SetobjectVisualTransform(object oObject, int nTransform, float fValue);
}

that being the code i put but it tells me "height_10.nss(3): ERROR: PARSING VARIABLE LIST" "height_10" being the name of the script

i made another based on the suggestion as followed

void main()
{
float SetPCVisualTransform(object oObject, int +10, float fValue);
}

This also gives me the same error code "height_10.nss(3): ERROR: PARSING VARIABLE LIST" would anybody be able to tell me what I did wrong?

Comments

  • AncarionAncarion Member Posts: 155
    Your script as written is basically just declaring a variable called "SetPCVisualTransform(object oObject, int +10, float fValue)" which is an invalid name. I think it might be helpful to know how you would like to implement your idea for a height slider in order to sort out the coding for it. Is this something you want players to be able to do through a conversation, for example?

    To give you a basic idea of how the new scaling function needs to be added to the game, this is a line of code I use in several of my NPC OnSpawn scripts to randomize their sizes +/- 10% of their base size:

    SetObjectVisualTransform(OBJECT_SELF,OBJECT_VISUAL_TRANSFORM_SCALE,1.0+(IntToFloat(Random(11))/100.0)*IntToFloat(Random(3)-1));

    With a bit more information about how you'd like to use the new scaling function, it might be possible to help you come up with a way to accomplish it.
  • Wall3tWall3t Member Posts: 90
    it was done as a test offline, and yes it was done through a conversation how could i do that?
  • Wall3tWall3t Member Posts: 90
    okay just adding onto this here i got my question answered on another post so thanks for helping out!
  • PappaChazzPappaChazz Member Posts: 20
    Hey, Wall3t! Thanks for letting me know. I took the liberty of taking a look at your thread, and it seems that it should work. Let us all know how it ends up when you get it on your server. *Anything* that can help players avoid being "cookie cutter characters" helps immersion and role play. Have fun :)
Sign In or Register to comment.