Thankyou. I saw that but it looked more complicated than what i had and diddnt want to spend all the time converting the script only to find out it diddnt work server side.
I'm having some problems with it though. Specifically, chaining two together.
After figuring out that it was acting like vectors rather than taking the co-ords as map positions i tried this:
NPC Code:
move 20,0,3,;
timeout = 3;
if (timeout) move 0,20,3,;
I expected this to move the npc across 20 over a duration of 3 seconds, then down 20 over a duration of three seconds.
However, what it does is move the npc across 20 over 3 seconds, then jump it another 20 (approx) without any time in between, then move down 20 over 3 seconds.
Can anyone explain what i'm doing wrong here? I'm using timeout to count down the three seconds that the npc is moving for because i couldnt see a better way. Is there a way of waiting until the last command is finished before executing the next one?
Also, is there any way to give functions arguements? I tried the c++ way (function myFunction(myarg) {}) but it gave me a syntax error.