turn pirate ship
#1

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
Код:
	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;
	}
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
Reply


Messages In This Thread
turn pirate ship - by keessie - 17.03.2009, 19:39
Re: turn pirate ship - by Weirdosport - 17.03.2009, 20:32
Re: turn pirate ship - by Dujma - 17.03.2009, 21:32
Re: turn pirate ship - by Google63 - 17.03.2009, 21:46
Re: turn pirate ship - by keessie - 18.03.2009, 06:08
Re: turn pirate ship - by maij - 18.03.2009, 14:30

Forum Jump:


Users browsing this thread: 2 Guest(s)