Need Help Programming 2 actors As Repeated Pattern
sinbot
Member Posts: 232
in Help Wanted
i have 2 actors that are identical except for having different color and behaviors. i need one actor (red/dangerous) to appear for about 1 second then be replaced with the other actor (black/helpful) for the same duration. i need these 2 actors to repeat this pattern but without overlapping each other (only 1 appearing at a time).
i tried a couple ideas (one involved a game attribute boolean, timers and loop) but nothing worked properly. would really appreciate some insight.
Comments
Red:
After 1 second
-Destroy
-Spawn Black
. . . . .
Black:
After 1 second
-Destroy
-Spawn Red
I once ran into a situation were the actor destroys itself before running the spawn behaviour , it happens once every 100 times , but it might break your game at a critical point. It would be safer to do a nested timer with a really short delay before destroying.
ex:
After 1 second
after 0.01 seconds
Destroy
-Spawn Red
awesome, much more simple then what i had programmed before lol ty for the tip as well icebox. dropped a micro timer in there