Move snap

Example
We want to the instance of the object 'obj_player' aligned to the cells of the room's grid

code at the creation event of instance : {    globalvar step; step = 32; with(obj_player) { can_move = true; on_vehicule = false; normal_speed = step / 8; boosting_speed = step / 4; } } code at the step event instance : {    with(obj_player) { if (place_snapped(step,step)) { if (keyboard_check(vk_shift)) { move_speed = boosting_speed; }            else { move_speed = normal_speed; }            if (keyboard_check(vk_left)) { hspeed = - move_speed; }            if (keyboard_check(vk_right)){ hspeed = move_speed; }            if (keyboard_check(vk_up)) { vspeed = - move_speed; }            if (keyboard_check(vk_down)) { vspeed = move_speed; }            if (!keyboard_check(vk_left) && !keyboard_check(vk_right)) { hspeed = 0; }            if (!keyboard_check(vk_up) && !keyboard_check(vk_down)) { vspeed = 0; }        }     } }