Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //PUT THIS PART IN THE CREATE FUNCTION
- move_speed = 5;
- //PUT THIS INSTEAD OF THE CURRENT MOVE FUNCTION
- if(x < Flag.x)
- {
- x += move_speed;
- }
- else if(x > Flag.x)
- {
- x -= move_speed;
- }
- if(y < Flag.y)
- {
- y += move_speed;
- }
- else if(y > Flag.y)
- {
- y -= move_speed;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement