Delay in a method

I have code for spawning an enemy then making the enemy run towards the player until he reaches him. However, I'm now trying to make en enemy that runs towards the player for a short distance, stop, then carry out another action. The only problem is I have no idea how to implement a delayed response in a method without interrupting the flow of the game. Ideally, the enemy would use the same method the chasing enemies do, then after a certain amount of time has passed, call a method that stops him. How can I implement this?

views:1559 update:2011/10/18 15:01:22
corona forums © 2003-2011