Wait for something within a for loop
Posted: Fri Apr 26, 2013 10:00 am
I currently have a situation where I am running through a for loop which iterates through a list of rooms in an area.
I have set various temp triggers which would run functions to confirm if the room is the correct room after going into it.
With the triggers created and waiting while the character is moving to the first room, the for loop is still running, thus causing it to run to the 2nd room. Is there a solution to this? Is there a way to pause after the first iteration and let the triggers do their thing and continue the iteration afterwards?
I have set various temp triggers which would run functions to confirm if the room is the correct room after going into it.
With the triggers created and waiting while the character is moving to the first room, the for loop is still running, thus causing it to run to the 2nd room. Is there a solution to this? Is there a way to pause after the first iteration and let the triggers do their thing and continue the iteration afterwards?