Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkForInputs() {
- if !(x == destination_x and y == destination_y) {return}
- var _up = keyboard_check(ord("W")) or keyboard_check(vk_up)
- var _left = keyboard_check(ord("A")) or keyboard_check(vk_left)
- var _down = keyboard_check(ord("S")) or keyboard_check(vk_down)
- var _right = keyboard_check(ord("D")) or keyboard_check(vk_right)
- var _dest_x = x + (_right - _left) * 16
- var _dest_y = y + (_down - _up) * 16
- if (destination_x == _dest_x && destination_y == _dest_y) {return}
- var _list = ds_list_create();
- var _collision_num = collision_point_list(_dest_x, _dest_y, AbstractBlock, true, 1, _list, true)
- if (_collision_num != 0) {return}
- destination_x = _dest_x
- destination_y = _dest_y
- }
Advertisement
Add Comment
Please, Sign In to add comment