k heres the objects stuff
Step Event:
//sprites
image_index=0;
image_speed=0;
//LR animations (working)
if (keyboard_check(ord('D'))) {
image_index=1;
}
if (keyboard_check(ord('A'))) {
image_index=2;
}
//player movement
hspeed = flyspd * (keyboard_check(ord('D')) - keyboard_check(ord('A')));
vspeed = flyspd * (keyboard_check(ord('S')) - keyboard_check(ord('W')));
//collisions
if hspeed!=0
if !place_free(x+hspeed,y)
{
if hspeed>0 move_contact_solid(0,hspeed)
if hspeed<0 move_contact_solid(180,-hspeed)
hspeed=0
}
if vspeed!=0
if !place_free(x+hspeed,y+vspeed)
{
if vspeed>0 move_contact_solid(270,vspeed)
if vspeed<0 move_contact_solid(90,-vspeed)
vspeed=0
}
Press X Event (not working, only playing one frame of the animation)
sprite_index = spr_player_attack
image_index = 0;
image_speed = 1;
Release X Event
sprite_index = spr_player;
image_index = 0;