Animation/Destroy actor

jbrown2177jbrown2177 Member Posts: 66
Hey gang, been working hard at the mechanics of GS and I'm finally starting to get it. However, ran into a caveat. I created the animation sequence of my actor getting smaller and disappearing when it collides with another actor and you collect the points, but it doesn't destroy the actor after the animation is complete. How do I make the actor do its animation and then destroy it after it completes it?

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    You'll need to create a Timer as well, separate from the animation.

    So the animation plays, and you should create a Timer as well that is the same amount of time as the animation, like this:

    Rule
    When Actor collides with Actor of Type ...
    Animate
    Timer
    After 1 second, Run to completion
    Destroy

    (Change 1 second to your specific needs...)
  • jbrown2177jbrown2177 Member Posts: 66
    Thanks Joe
  • jbrown2177jbrown2177 Member Posts: 66
    Joe! You're my HERO bro it worked. I messed with the timer so it would destroy almost as soon as it enters and it looks smooth. Now I am going to create a smaller invisible actor inside the other to make it touch that one before it touches the outer one to appear to have even a better destroy effect.
  • ozboybrianozboybrian PRO Posts: 2,102
    I'm going to try that now lol.
  • calvin9403calvin9403 Member Posts: 3,186
    this thread is a year old...
  • ozboybrianozboybrian PRO Posts: 2,102
    YOU'RE THE MAN!!!!!

    The GameSalad Fb page said this to, but I missunderstood.

    Thanks so much to both of ya : )
  • ozboybrianozboybrian PRO Posts: 2,102
    Ok, What if the Object is falling and hits an actor and you want it to simulate the two items being destroyed then! the item that isnt the falling item continues on.

    I have falling items but when they should stop and animate, they keep falling while they animate. :(
  • simo103simo103 Member, PRO Posts: 1,331
    could you try changing self.linearvelocity to zero on the falling actor when they collide?
Sign In or Register to comment.