Help with timer and change scene

Hi guys, been racking my brains for ages trying to figure this out, and i can't.
Basically I have got a ball bouncing around my screen, and I have a rule when touch is pressed ball is destroyed, and it makes a sound when destroyed.
Then i have created a new rule when touch is pressed/released, (and I have added a timer), that after 3 seconds the scene changes.
But it doesn't change the scene. I have tried everything. The only time it works is when I remove the timer behaviour, but that means the scene changes as soon as the ball is touched and destroyed, and I don't want that. I want the scene to change after a few seconds. I have even removed the destroy behaviour, and it still doesn't work. For some reason it does not like the timer behaviour, and that is a vital component for me.
Any ideas?
Basically I have got a ball bouncing around my screen, and I have a rule when touch is pressed ball is destroyed, and it makes a sound when destroyed.
Then i have created a new rule when touch is pressed/released, (and I have added a timer), that after 3 seconds the scene changes.
But it doesn't change the scene. I have tried everything. The only time it works is when I remove the timer behaviour, but that means the scene changes as soon as the ball is touched and destroyed, and I don't want that. I want the scene to change after a few seconds. I have even removed the destroy behaviour, and it still doesn't work. For some reason it does not like the timer behaviour, and that is a vital component for me.
Any ideas?
Comments
• You could make it invisible with Alpha Zero
• Move it off-screen
• Set replicate to zero
...and once your actor is hidden from the player, wait three seconds... then change the scene.
but this is the way photics is saying to do it, and how i would do it as well:
when bouncing is touched instead of destroy have a change attribute behavior and change self color alpha to 0
then have a rule when attribute self color alpha=0
timer after howevver many seconds you wantwith run to completion checked
-change scene
Put your rule in a separate actor, off-screen:
When BallDes is true
Timer after 3 seconds
Go to next scene.
Hope that sorts it.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
If the actor is destroyed, how will it run new behaviors?
So, by keeping the actor around, it can still run behaviors.
So how can you destroy the actor and still change the scene three seconds later?
You fake the actor's death.
If done properly, the player can't tell if an actor was destroyed or if it's hidden.
I have one more question regarding this topic. When the ball is destroyed is there a way of animating the destruction. Like a very very simple effect. Just imagine a ball bouncing around and when you touch it, you just don't want it to dissapear, you want it to go out with a pop or something. Something visually simple if you know what i mean? A pop, or a simple flash, or a simple burst, like you see on many games. Any tips?
http://www.deepblueapps.com/Deep_Blue_Ideas_Ltd./ExplosionGenerator.html
Just export out your frames to use in an animation behavior, should be just right for you!
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Here's a thread that helps explain part of how I do it...
http://gamesalad.com/forums/topic.php?id=24445
As for the animated explosion, BOT has that too. The trick is to make the last image blank — without restoring the original image. That will keep the actor blank. I didn't use the Explosion Generator to make it though. I created it in Pixelmator. It has great brushes.
Photics many apologies but your explanation was way too advanced for me. I like the simple white flash idea it would be perfect. Its going to take me a while to learn everything and I am so happy t have guys like yourselves helping out, its great.