17.03.2009, 19:39
hello
my english isn't good i hope you can understand :P
i'm making a script for the pirate ship
i wan't to turn it and then go forward in the turned position.
i've made this
but the ==0 must be for RotZ
i think that the code isn't good
only if RotZ is 0 or 45 or 90 the ship has to go forward
i hope you understand my question
grz
my english isn't good i hope you can understand :P
i'm making a script for the pirate ship
i wan't to turn it and then go forward in the turned position.
i've made this
Код:
if(strcmp(cmdtext,"/forward1",true)==0)
{
if(GetObjectRot(schip,RotX,RotY,RotZ)==0)
GetObjectPos(schip, x, y, z);
MoveObject(schip, x, y+99999, z, 3);
if(GetObjectRot(schip,RotX,RotY,RotZ)==45)
GetObjectPos(schip, x, y, z);
MoveObject(schip, x-99999, y+99999, z, 3);
if(GetObjectRot(schip,RotX,RotY,RotZ)==90)
GetObjectPos(schip, x, y, z);
MoveObject(schip, x-99999, y, z, 3);
if(GetObjectRot(schip,RotX,RotY,RotZ)==135)
GetObjectPos(schip, x, y, z);
MoveObject(schip, x+99999, y-99999, z, 3);
if(GetObjectRot(schip,RotX,RotY,RotZ)==180)
GetObjectPos(schip, x, y, z);
MoveObject(schip, x, y-99999, z, 3);
return 1;
}
i think that the code isn't good
only if RotZ is 0 or 45 or 90 the ship has to go forward
i hope you understand my question

grz


