My game have two knights, one is player and other is enemy.
- My enemy must attack player when it is near him.
The enemy attack has only one attack that is
swinging the sword towards the player.
- The enemy must kept on moving to find the
player. (My game only have single platform.)
- The enemy only have one attack when player is
near him other than that it should be in walking
- The enemy must always face towards the player. (I tried the flip horizontal action but it only works once, when player moves to left/right after the game starts the enemy don’t face towards player.)
- Use Distance between two objects action…e.g. Distance between Player and Enemy is less than 1000 pixels.----->>>Change the animation of Enemy to Attack.
- The enemy will be keep on moving on X-axis if you use TimeBackAndForthMirror Movement as your behavior for Enemy. Decide the distance and speed and your enemy will start moving. (Change your animation to Walk too)
- Refer to My Point 1. (Use Invert Condition) and Change animation of Enemy to Walk.
- Compare position of player on X-Axis with respect to Enemy…
e.g. If position of the player is less than Enemy ----Flip Enemy --YES/NO
If position of the player is more than Enemy ----Flip Enemy–YES/NO
Depending upon the position of Enemy and Player you can choose accordingly.
Feel free to contact in case you need more help…
But I did it in different way and it works.
Its really nice to see that you did it at your own…