chefdez
Member
Hello everyone,
What I'm trying to do here is to create an attack sprite in front of my character depending on the direction he's facing. The game is top down and I can move with WASD, I have sprites/objects for attacking in these directions.
I was trying something along these lines,
if mouse_check_button_pressed(mb_left) && sprite_run_left or sprite_idle_left {
attacking=true;
image_speed = 1;
image_index = 0;
instance_create(x,y-10,object_slash_left);
}
Obviously this is way off and I'm sure most of you are have your head tilted like whaaaaaaaaaat? I'm very new so if you would be so kind and help that'd be great.
I was wondering if there was a way to resolve this using a case statement? Like if I'm facing left then I will attack left, and If I'm facing right I will attack right.
Thanks
PS: I need to guidance on making the best movement on top down thats 8 directional, I can only move 4 right now, any tips?
What I'm trying to do here is to create an attack sprite in front of my character depending on the direction he's facing. The game is top down and I can move with WASD, I have sprites/objects for attacking in these directions.
I was trying something along these lines,
if mouse_check_button_pressed(mb_left) && sprite_run_left or sprite_idle_left {
attacking=true;
image_speed = 1;
image_index = 0;
instance_create(x,y-10,object_slash_left);
}
Obviously this is way off and I'm sure most of you are have your head tilted like whaaaaaaaaaat? I'm very new so if you would be so kind and help that'd be great.
I was wondering if there was a way to resolve this using a case statement? Like if I'm facing left then I will attack left, and If I'm facing right I will attack right.
Thanks
PS: I need to guidance on making the best movement on top down thats 8 directional, I can only move 4 right now, any tips?