You'll need to be more specific. You seem to be asking for some kind of AI, which can range from very difficult to relatively simple depending on what exactly you want the sprites to do.
Offline
There are several ways depending on what you want.
Hand to hand combat: Simply have the enemy forever point towards your character and move 2 steps. Then have it where if the enemy is touching your character then broadcast 'attack' wait .5 seconds (this last part is to make sure the enemy doesn't broadcast attack 50 times per second) then on the character make a script saying: when I recieve attack change health by -1. If health is < 0, hide.
Last edited by bullelk12 (2012-09-11 17:34:09)
Offline