37637598 on 30/9/2008 at 09:35
MoveWorld Y ANGZ2 * Speed
MoveWorld X 0 - ( ANGZ2 * Speed )
I have this line of code in a script of mine, though I believe my syntax is incorrect. The item does not move at all.
When I replace "ANGZ2 * Speed" with a value such as 10, then it works, the item moves, but for some reason it wont work using other variables.
Thanks in advance!
Vinnie
cyrano on 1/10/2008 at 00:40
In my experience, MoveWorld will accept variables for arguments, but I think you are confounding the engine with the operations in the same line. Try setting ANGZ2 before using it in the move function (that will need to be a do-once condition). Something like:
Code:
short doOnce
float ANGZ2y ; this is to store value for moving along y
if (doOnce == 0 )
set doOnce to 1
set ANGZ2 to ( ANGZ2 * Speed )
set ANGZ2y to ( 0 - ANGZ2 )
endif
MoveWorld X ANGZ2
MoveWorld Y ANGZ2y
I declared ANGZ2y as a float since I do not know what sort of values ANGZ2 and Speed store.