Timer delay before spawn?

DigiChainDigiChain Member, PRO Posts: 1,288
edited November -1 in Working with GS (Mac)
Hi, I seem to be really struggling with the use of timers.

Quite simply I have an actor (X) setup so that when it collides with another actor > destroy X > Timer for 2 seconds > Respawn X at coordinates...

It doesn't work, X doesn't respawn. Without the timer X spawns fine, but without the delay I want. What am I doing wrong?

Comments

  • AppsRacKAppsRacK Member Posts: 346
    well dont use "for" use "after" on the timer attributes.
  • DigiChainDigiChain Member, PRO Posts: 1,288
    I've tried both and neither work.
  • AppsRacKAppsRacK Member Posts: 346
    Where do you place your spawn attributes? Maybe you could post a screenshot or video so it will be easy to identify the problem.
  • DigiChainDigiChain Member, PRO Posts: 1,288
    I have a screenshot - but don't know how to post it on here.

    This the structure of my Rule:

    RULE > When Actor receives event: overlaps or collides: with: Actor2

    > Destroy this actor

    >Timer: after 2 seconds (run to completion) > Spawn actor
  • DigiChainDigiChain Member, PRO Posts: 1,288
    ChopperKhan said:
    I have a screenshot - but don't know how to post it on here.

    This the structure of my Rule:

    RULE > When Actor receives event: overlaps or collides: with: Actor2

    > Destroy this actor

    >Timer: after 2 seconds (run to completion) > Spawn actor

    The Spawn actor is placed within the timer attribute
  • AppsRacKAppsRacK Member Posts: 346
    You can do it like this. First make a game attribute

    ActorIsDead <-Bool

    On your actor
    Rule When Collide with actor 2
    ->ActorIsDead = true
    ->destroy actor

    Either place a blank actor or doubleclick one of your BG and unlock it. On that Place a rule which will spawn the actor 1.
    Rule when game.ActorIsDead = True
    Timer after 2 secs
    ->spawn Actor1 to whatever coordinates you want
    ->ActorIsDead = false

    :)
  • StormtrixStormtrix Member Posts: 256
    Or ---
    Rule -
    Actor X collides with whatever
    Change attribute: self.color.alpha To: 0
    Timer After 2sec. Spawn new Actor
    Then 2nd rule inside Timer -- Destroy Actor

    Above you seem to be destroying the actor before the timer can even begin
    hence why it's not working.

    Storm
Sign In or Register to comment.