SpriterDrag

Untitled

Mar 25th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (!homing)
  2. {
  3.     if (obj_mario.x < x) && (xscale = 1)
  4.     {
  5.         xscale = -1
  6.         homing = true
  7.     }
  8.     if (obj_mario.x > x) && (xscale = -1)
  9.     {
  10.         xscale = 1
  11.         homing = true
  12.     }
  13. }
  14. else if (homing)
  15. {
  16.     if (xscale = 1)
  17.         hspeed += 0.05
  18.     if (xscale = -1)
  19.         hspeed += -0.05
  20. }
  21. if (abs(hspeed) > 2)
  22.     hspeed = 2 * sign(hspeed)
Add Comment
Please, Sign In to add comment