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

LokitoesLokitoes Member, PRO Posts: 187

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 Member Posts: 1,159
    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 Member, PRO Posts: 187

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

  • LokitoesLokitoes Member, PRO Posts: 187
    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 Member Posts: 1,159

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

  • LokitoesLokitoes Member, PRO Posts: 187

    @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 Member Posts: 57

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

Sign In or Register to comment.