Trouble Playing Animation Fully after Destroy / Collision

The game I've been making has bubbles that float up the screen, each with various sentences inside them being randomly spawned from a table. Being new to gamesalad, I was happy to be able to get this far. I can click on the bubbles, which then grow in size, and are dragged to various different actors, which trigger animations. The problem I am now running into is that if I set bubbles to "destroy" after the collision with the other objects (so they don't continue to float), then the animation does not play fully. Does anyone know how to work this out? What i want is the bubble's life to end when they are dragged to these other actors, and the animation to play. Is this an issue to use a timer somehow or is there a better way?

Comments

  • mataruamatarua Auckland, New ZealandMember Posts: 854
    You would need to play the animation - wait for it to finish and then destroy the actor.

    Unfortunately timers and animation are not good bed buddies.

    You can say the animation should play at X frames a second and then you destroy based on X frames = X seconds = put a timer in for X seconds and the animation does not play fully.

    That's because the animation is too slow. So you have to give the actor time to animate. Give it more space to have timing issues as such. Have the last frame invisible so it does not show to the player.

    Animate at 30FPS with 30 frames and it will take about 1.1 to 1.5 seconds - I have these numbers from something I was doing so they will vary.

    So the order would look like this...

    1. Collision

    2. Update rules (score, health, gravity, colliding etc.)

    3. Start Animation which ends in clear frame

    4. Timer states when actor gets destroyed with plenty of room for FPS issues.

    Hope this helps and is what your issue is.

    Cheers, M@
  • UtopianGamesUtopianGames Member Posts: 5,692
    You can take better control of the animation by using its frame name.

    See our free template http://www.deepblueapps.com/animation-controller/



    Darren.
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    Thanks Darren I will check that out :D

    Cheers, M@
Sign In or Register to comment.