Getting some help with a line of code - height sliders
Wall3t
Member Posts: 90
so someone awesome gave this line of code to me that changes the height of the npcs but Im rather inept at figuring this out. I tried changing the object_self to object_pc but i get an error.
I was looking to add this to a conversation dialogue. would anyone know how i could do that?
SetObjectVisualTransform(OBJECT_SELF,OBJECT_VISUAL_TRANSFORM_SCALE,1.0+(IntToFloat(Random(11))/100.0)*IntToFloat(Random(3)-1));
I was looking to add this to a conversation dialogue. would anyone know how i could do that?
SetObjectVisualTransform(OBJECT_SELF,OBJECT_VISUAL_TRANSFORM_SCALE,1.0+(IntToFloat(Random(11))/100.0)*IntToFloat(Random(3)-1));
Post edited by Wall3t on
0
Comments
A simple example script for the line 1 Action Taken might be:
void main()
{
object oPC=GetPCSpeaker();
float fCurrentScale=GetObjectVisualTransform(oPC,OBJECT_VISUAL_TRANSFORM_SCALE);
SetObjectVisualTransform(oPC,OBJECT_VISUAL_TRANSFORM_SCALE,fCurrentScale+0.1);
}
This will increase the PC's size by 10% every time line 1 ("increase my size") is chosen in the conversation. Just change "fCurrentScale+0.1" to "fCurrentScale-0.1" to decrease the PC's size in the line 2 script.
Thanks as well for the help!