View Single Post
  #12  
Old 08-30-2001, 11:24 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
It's not really simple math

NPC Code:

radangle = random(0,2*3.14);
dx = cos(radangle);
dy = -sin(radangle);

move dx*5,dy*5,5,16;



3.14 = pi
It's dy = -sin(radangle) because when
the angle is pi/2 (90 degrees) then it should
move up, so sin(90) = 1 needs to move the
npc up which means y needs to be decreased
Reply With Quote