Spawn / Repeat problem with table data

RohalRohal GermanyMember Posts: 62

I have a spawner place in my scene.
Every 5 seconds the following stuff happens:
· a random index is set, based at the rowcount of my table
· loopIndex is set to ZERO
· loopMax is set based on cellValue data from my table

(That works so far...)

After that i start a "Loop while"
· While loopIndex < loopMax i spawn an actor.

In my table i have different formation of enemies (amount, x-margin, y-margin).
for example:
The loop should spawn the actor 3 times with a position x margin from 100px.
Sometimes this works, sometimes to loop does not finish till loopMax and i don't know why.

Is there some big mistake in my thought?
Thanks for help.

Comments

  • RohalRohal GermanyMember Posts: 62

    ...it seems, a litte timer solved the problem.
    I added a "After 0.5 seconds timer" at the end of the loop.

  • RohalRohal GermanyMember Posts: 62

    ... is it possible to give the spawned instances a different speed?

Sign In or Register to comment.