E
EnSea
Guest
Basically, I just need some basic coding help.
I can't figure out how to change the sprite based on what direction the enemy is facing.
Side Notes: This is an RPG Dungeon-like game, the coding i need is basic and no overly complicated as I'm fairly new at this.
This is my enemy code:
I can't figure out how to change the sprite based on what direction the enemy is facing.
Side Notes: This is an RPG Dungeon-like game, the coding i need is basic and no overly complicated as I'm fairly new at this.
This is my enemy code:
GML:
if distance_to_object(player)<=Screen{
if (collision_line(x,y,player.x,player.y,block,true,true) = noone) {
direction=point_direction(x,y,player.x,player.y);
speed = 1;
}
}