Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if keyboard_check(vk_right)
- {
- x += 5;
- }
- if keyboard_check(vk_left)
- {
- x -= 5;
- }
- if keyboard_check(vk_down)
- {
- y += 5;
- }
- if keyboard_check(vk_up)
- {
- y -= 5;
- }
- if x < 0
- {
- x = 0;
- }
- if x > room_width - 1
- {
- x = room_width - 1;
- }
- if y < 0
- {
- y = 0;
- }
- if y > room_height - 1
- {
- y = room_height - 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement