View Single Post
  #3  
Old 11-07-2005, 09:17 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
A bit of math will allow you to move by angle directions.

This might work. Not sure, though, as I have not checked it.
NPC Code:
this.var = (angle / 360) * (pi * 2);
move(cos(this.var) * speed, -sin(this.var) * speed, 0.5, 0);


You should put some kind of check in as to whether the angle is < 0 or > 360, though.
__________________
Skyld