Advertisement
Guest User

Analog

a guest
Jan 11th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. xx = mouse_x
  2. yy = mouse_y
  3.  
  4. l_max = argument0 //max length of analog zone
  5. s_max = argument1 //max spd of player
  6.  
  7. if((mouse_button_check(mb_left)) && (mouse_x < view_wview[0]/2) && (mouse_y < view_hview[0])){
  8.     dir = point_direction(xx,yy,mouse_x,mouse_y)
  9.     spd = l_max / (l_max/s_max)
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement