GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Change scene on button press and have it change back by itself?

LokitoesLokitoes Posts: 136Member, PRO

Hi all,

I am having a problem with something that seems simple, Basically I want to change scene when a button is pressed, but have that scene revert back to the original scene by itself after a certain amount of time (say, just 10 seconds). Using a ‘for’ timer on keyboard press rule doesn’t seem to work – it will change but it won’t change back. Clearly I need to do something more intricate to get this to work…?

I’ve also tried doing it more simply with an image rather than a scene, but the response is the same. Clearly the ‘change’ behaviours are the wrong ones to use for this…?

I imagine I need to play with attributes instead but I don’t know where to start?

Any help is appreciated. ☺

Cheers

Comments

  • DuesDues Posts: 1,159Member
    edited July 2015

    In your button have a rule that says: When touch is pressed - change scene to "your scene"

    In that new scene put an actor that have a rule in it that says: When self.time = 10 seconds change scene to "the scene you were before"

  • LokitoesLokitoes Posts: 136Member, PRO

    Damn that was easy. Thanks @Dues I'm an idiot!

  • LokitoesLokitoes Posts: 136Member, PRO
    edited July 2015

    Does the same go for changing between actors? Not sure how one even changes an actor rather than an image of that actor...

  • DuesDues Posts: 1,159Member

    No problem :)
    Hiw would you like to change the image?

  • LokitoesLokitoes Posts: 136Member, PRO

    @Dues Image is probably the wrong term... I'd like an actor to change to another actor on a button press rule. (Then in turn that actor could change to another or back to the original, etc).

  • dustingriffiedustingriffie Posts: 57Member

    You could destroy actor, spawn new actor at same location.

Sign In or Register to comment.