When the player is on the left side of the enemy and hits the collision line, the enemy gun will sort of point towards the player but not facing the right direction. Of course, nowhere in the game the user will actually see an Abilities object, nor will it ever be put in a room (as would monsters, for example). Situation like this are what get the gamer hooked to the game, but also requires more effort by the programmer. Make the AI a non-physics object and invisible - then create a physics object that is always lerping towards the AI. Some of the features of the engine : Tile Based Collisions : Tiles offer the fastest collision. This is a tile based platform engine which uses efficient tiles for instance collisions, as well as incorporating those efficiencies into horizontal and vertical tile layer moving platforms. Will the enemy stand there and fire back, or will he take cover and react to the fact he is being shot at. Build a physics based pathfinding system and you can use this in place of the 'mp' movement functions. Tile Based Moving Platform Engine for Gamemaker Studio 2. When the player collides with the enemy collision line on the right side, the enemy gun will point towards the player properly. A reactive AI allows the player to feel immersed in the game.
Something like pointdirection (x,y,objplayer.x,objplayer.y) will create a link between the enemy and the player that will allow them to keep track of that player. When they move left the gun will face left as it should. For a simple game, the basic thing to remember is that the AI needs to know where the player object is all the time, even if, in game, the enemy hasnt spotted the player.
When the enemy move's to the right their gun faces right.