I want to make it so that no matter where the enemy moves in the room, it'll always be facing in your general direction. How can I do this? :/
BTW I'm really tired as I write this so hopefully it makes sense. :D
hmmmm...well, I know that it involves multiple sprites if it's not top-down, but if it's TD then all you need is the right sprite-rotation codes. Unfortunately my advice ends there...as of yet I am not very fluent in this area of GML.
I know that there are some rotation tutorials on the GMC that involve rotating to face the mouse, you could adapt those from mouse to player object.
Very easily.
I'm assuming a number of things here, so replace the names of the objects and sprites as needed:
The player is called player_obj
The enemy is called enemy_obj
The enemy has a sprite for left and right facing- they are called face_left and face_right
Now you would do something like this in the enemy's step event. If you have more than two sprites, it gets a bit more complex, but it's easy enough to change.
if self.x<player_obj.x{self.sprite_index=face_right}
if self.x>player_obj.x{self.sprite_index=face_left}
That help?
Lemme know if I messed up, that was off the top of my head. :P
It works! ^_^ Thanks.
No problemo. ;8