Need Help Programming 2 actors As Repeated Pattern

sinbotsinbot Member, PRO Posts: 177

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.


  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2018


    After 1 second
    -Spawn Black

    . . . . .


    After 1 second
    -Spawn Red

  • IceboxIcebox Member Posts: 1,483

    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.

    After 1 second
    after 0.01 seconds

    -Spawn Red

  • sinbotsinbot Member, PRO Posts: 177

    awesome, much more simple then what i had programmed before lol ty for the tip as well icebox. dropped a micro timer in there

Sign In or Register to comment.