i am currently coding a fighting game where the player tries to beat a enemy, but i cannot make the enemy use random moves (strong kick, weak kick, weak punch, strong punch) and walk back and forth randomly. can anyone help me?
Is this a turn based scenario you are working on?
If so, when enemy's turn call a method (from the world) to maybe do some proximity checking. If player not near, just move (with a small chance of turn). If player is near, turn towards and random chance fight, with random fighting action. If not turn based, just call the method from the act method of the enemy; and, maybe have a slight delay built in between fighting actions.