Help with timer and change scene

appybankappybank Member Posts: 22
edited November -1 in Working with GS (Mac)
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?

Comments

  • PhoticsPhotics Member Posts: 4,172
    Maybe don't delete it right away...

    • 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.
  • appybankappybank Member Posts: 22
    what do you mean? What am trying to achieve is when the bouncing is touched it is destroyed and then after a few seconds, the user is taken to the next screen. I want a delay but the timer behaviour will just not work.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    make sure run to completion is checked in the timer

    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
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, try making a boolean behavior, call it BallDes and after your actor destroy, make BallDes to true.

    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

  • PhoticsPhotics Member Posts: 4,172
    appybank said:
    what do you mean? What am trying to achieve is when the bouncing is touched it is destroyed and then after a few seconds, the user is taken to the next screen. I want a delay but the timer behaviour will just not work.

    As I mentioned in the physics section of The Unofficial GameSalad Textbook... don't treat GameSalad like the real world. GameSalad is great at simulating some aspects of the real world... but good game design might actually involve faking some things.

    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.
  • appybankappybank Member Posts: 22
    Photics and gyroscope guess what? both suggestions worked like a treat. thank you so much guys.

    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?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Deep Blue Apps are selling version 2 of their explosion generator for £3, or version 1 is free:

    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

  • PhoticsPhotics Member Posts: 4,172
    appybank said:
    A pop, or a simple flash, or a simple burst, like you see on many games. Any tips?

    If you've played BOT, you might have seen a red flash when TANK is hit or a white flash during explosions. That's actually just a single particle.

    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.
  • appybankappybank Member Posts: 22
    cheers gyroscope i downloaded the explosion generator but it was to limited, and the explosions were way too dramatic for what I am doing. My explosion needs to be simple but comical if you know what I mean. Its more of a cartoon based project so it needs to be fun and zappy. Cheers anyway

    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.
Sign In or Register to comment.