Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   scripting question (https://forums.graalonline.com/forums/showthread.php?t=19443)

Andor_GP1 12-23-2001 06:24 AM

scripting question
 
Ok i made a right outline of a moving engine in whihc up is forward, down is backwards, and left and right are turn (8 directions all together) (while the variable this.type=1 they will continue to move foward unless its set back to 0 (by reversing))
now how would i make a delay so it would only afect the rate at which they can turn? i tried tiemout but that afects their constant moving pace, i don't want them to stop moving while they turn.

T3CK 12-23-2001 06:57 AM

Maybe you could implement a turning speed variable?

Er1c 12-23-2001 07:05 AM

You just need to add/subtract less from the players X/Y when they are pushing the left or right arrows then you are now. That will make them turn slower.

Slaktmaster 12-23-2001 07:40 AM

8 directions = more advanced than unlimited directions...

Andor_GP1 12-24-2001 03:59 AM

what do you mean more advanced?

o and i used a turn variable that goes up with the timeout. thanx. that was alot easier than i thought lol.


All times are GMT +2. The time now is 02:18 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.