SetObjectVisualTransform() ?
Zephirius
Member Posts: 419
Can anyone give me an example script using the function - SetObjectVisualTransform()
I'm trying to enlarge an object by using it and am having trouble figuring it out.
Thanks -
Z
I'm trying to enlarge an object by using it and am having trouble figuring it out.
Thanks -
Z
0
Comments
Otherwise the Lexicon example is pretty helpful:
https://nwnlexicon.com/index.php?title=SetObjectVisualTransform
TR
void main() { object oBarrier = GetObjectByTag("TEST_BARRIER"); float fSize = GetObjectVisualTransform(oBarrier,OBJECT_VISUAL_TRANSFORM_SCALE); if( GetTag(OBJECT_SELF) == "plus_lever" ) { SetObjectVisualTransform(oBarrier,OBJECT_VISUAL_TRANSFORM_SCALE,fSize+0.2); } else { SetObjectVisualTransform(oBarrier,OBJECT_VISUAL_TRANSFORM_SCALE,fSize-0.1); } fSize = GetObjectVisualTransform(oBarrier,OBJECT_VISUAL_TRANSFORM_SCALE); FloatingTextStringOnCreature("Size: "+FloatToString(fSize),GetLastUsedBy()); }I made this when I was initially playing around with the functions. I was a little bummed to find out what Tarot just pointed out since the object in my example was a magical barrier. But, I've found a few other fun uses for it.
TR