Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!homing)
- {
- if (obj_mario.x < x) && (xscale = 1)
- {
- xscale = -1
- homing = true
- }
- if (obj_mario.x > x) && (xscale = -1)
- {
- xscale = 1
- homing = true
- }
- }
- else if (homing)
- {
- if (xscale = 1)
- hspeed += 0.05
- if (xscale = -1)
- hspeed += -0.05
- }
- if (abs(hspeed) > 2)
- hspeed = 2 * sign(hspeed)
Add Comment
Please, Sign In to add comment