Having Serious Issue with Scene Change- HELP!

kevinrogers85212kevinrogers85212 Member, BASIC Posts: 13

My entire game runs smoothly without so much as a hiccup until my Score Screen at the end of the game. I have an actor with a rule that says, "If actor receives 'touch = pressed,' then 'change scene to = Start Screen,'" just a simple basic scene change. The only problem is, when you press on the actor, it simply resets the current scene, instead of changing the scene to the Start Screen as it ought to. I'm ENDLESSLY frustrated with this, because my game is otherwise ready for publishing.

I also thought to include other behaviors that respond to the same user input to see if the input was the problem, but nope: my other behaviors function perfectly fine, all except the darn scene change. I simply can't get it to budge. I've tried copying the scene, copying the actor, making completely new actors, all to no avail. If ANYONE has encountered this problem, or knows how I can go about fixing it, PLEASE help!

Best Answers

  • RThurmanRThurman Posts: 2,880
    Accepted Answer

    You might want to check to see if you have a rule on an actor that states something like 'When game.score = 100, go to scene: ScoreScreen'.

    Perhaps it really is changing to the Start Screen and then changing instantly back to the ScoreScreen. (Because of a rule like the above.) If that is the case, change the score back to '0' before going to the Start Screen.

  • tatiangtatiang Posts: 11,949
    Accepted Answer

    Some basic troubleshooting suggestions:

    1. Add a Log Debugging Statement right before the Change Scene behavior. Open the Debugger from the View menu and check to see if that statement appears when you think the scene should change.
    2. Add a Log Debugging Statement to the top of an actor's rules (not inside of a rule condition though) on the Start Scene. Be sure to type in something different from the statement in #1 above. Watch the Debugger to see if that statement appears when you think it should change to the start scene.

    Report back here with the results of these two steps and we can help you further.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • gyroscopegyroscope I am here.Posts: 6,598
    edited June 2014 Accepted Answer

    Good reasoning from @tatiang so we've got more info...

    In the meantime, another thought - something for you to checkout:

    When you reset the game values, just before the change of scene, is there any attributes there that'd trigger restarting the level? (So I'm asking have you anywhere in the scene a rule along the lines of

    When SuchandSuchAtt = ??
    Reset Scene or Change Scene YourExistingScene
    

    or

    When SomeParticBool is true (or false)
    Reset Scene or Change Scene YourExistingScene
    

    If so, either of these or similar would trigger the scene restart (and so the Change Scene to the Start Scene would be "ignored/forgotten about")

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Answers

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited June 2014

    Hi @kevinrogers85212 What happens if you use Go to Scene: Previous Scene if the Start Scene is just before your Score scene?

    Failing that, try using Go to Scene: At Index then put in the scene index number. Does that work?

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kevinrogers85212kevinrogers85212 Member, BASIC Posts: 13

    Thanks to all who've responded. @colander, it's truly a simple scene change, I've done it a million times.

    @gyroscope, any "Change Scene" behavior causes the current scene to reset. I've tried having it change to every other scene, but all it does is misfire and reset the scene. And I tried the scene index (I want it to go to scene #1, my Start Screen,) and that doesn't work either.

    @RThurman, I thought that too, and put in the equivalent of a "Reset Game" behavior which fires simultaneously with the scene change.

    I MAY HAVE FIGURED IT OUT. I'll test for a minute and reply.

  • kevinrogers85212kevinrogers85212 Member, BASIC Posts: 13

    Nope. I thought for a moment that it might be caused by an attribute causing it to skip immediately back to that scene, as suggested by @RThurman, but that doesn't appear to be the case. I'll keep poking, thanks for the suggestion-

  • kevinrogers85212kevinrogers85212 Member, BASIC Posts: 13

    Things just got a lot weirder. I tried disabling the scene change upon touch just to see if the actor would respond to other behaviors normally, but it STILL reset the scene, despite the scene change behavior being turned off. I'm usually pretty good at troubleshooting, but I have no idea what's going on...

  • kevinrogers85212kevinrogers85212 Member, BASIC Posts: 13

    I just rebuilt the actor from the ground up using a brand new actor and fresh behaviors, and it did the same thing.

  • kevinrogers85212kevinrogers85212 Member, BASIC Posts: 13

    @tatiang, thanks, I'll try that. I'll post the results when I get the chance.

  • kevinrogers85212kevinrogers85212 Member, BASIC Posts: 13

    Here we go guys, I tried the debugging sugestion offered by @tatiang, and this is what I got:

    No dice. The Scene Change simply isn't working. I considered @RThurman's possibility and put a debugging statement on an actor in each scene, and none of them loaded unexpectedly.

  • kevinrogers85212kevinrogers85212 Member, BASIC Posts: 13

    UREKA! Thanks to all who helped, it's working perfectly now. I DID have another actor in the scene which was keeping the scene on the Score Screen, because (in its behaviors) when "Game.GameOn?" was TRUE, it would change it to false and change the scene to the score screen. The trouble was, if "Game.GameOn?" was already false, it would negate any other attempt to change the scene. I know that might not make sense without knowing the context of the game, but thanks so much to everyone!

    This is exactly what I like to see! :D

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Yay!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.