Spawn actor

Why I can't spawn an actor with timer?
I want to spawn an actor after 2 seconds I touch a button, and then destroy this actor.

Comments

  • PaxPaxPaxPax Member Posts: 106
    Make sure you have run to competition checked. It works for me.

    cheers
  • As a tip, instead of using timers, you should avoid problems in the future by avoiding timers all together. In this example, you could do this:

    rule:
    if touch is pressed
    AND
    if self.time > 2 seconds

    destroy actor
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Why I can't spawn an actor with timer?
    I want to spawn an actor after 2 seconds I touch a button, and then destroy this actor.
    It's very helpful if you tell us what rules you are using or post a screenshot so that we can help you better.

  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    What is the disadvantage of using timers instead of the self.time attribute?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Timers negatively affect performance more than attribute rules.

    http://forums.gamesalad.com/discussion/44707/timers-are-for-chumps-gs-optimization-tips/p1
  • felipedcfelipedc Member Posts: 3
    I got it, thank you.
    Just drag the time behavior from another project.
Sign In or Register to comment.