if keyboard_check(vk_left) { global.a_attack=true; if place_free(x-4,y) x-=4; image_speed=0.5;sprite_index=spr_link_left; global.dir='left' };
If that gives any problems, you may have to expand it, like this:
if keyboard_check(vk_left) {
global.a_attack=true;
if place_free(x-4,y) x-=4;
image_speed=0.5;
sprite_index=spr_link_left;
global.dir='left';
}