Hello, I was creating a function for enemy shoots players.
The function:
The problem is, this function are creating three bullets at the same time, but I want to create one by one after calling the function. Any idea?
If you want anything done over time, you generally want to use the timer behavior.
You could also use the wait action, but it is commonly misused and causes more problems, so I don't recommend it.
Develop games in your browser. Powerful, performant & highly capable.
I used timers to call the function, did you mean to use the behavior time to create the bullets instead the function?
Function or not doesn't matter. You're using a for loop, which will complete in one tick.
You can try to set timers to spawn bullets on timer trigger with durations based on loopindex.
I did it this way, I don't know if is the best way, but it's works