Problem change scene.

fabiookamurafabiookamura Member Posts: 5
edited December 2012 in Working with GS (Mac)
My problem is that when my character loses all lives was to go to the scene to "Game Over", but the game freezes and does not change. Can someone help me? I am developing on Windows 7.

--- edit
I upload this vídeo of my problem.

Comments

  • GameSafari_IncGameSafari_Inc Member Posts: 8
    Can we see the "code"?
  • fabiookamurafabiookamura Member Posts: 5
    The video show the code of problem, is the "deads" group.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Most likely your problem is that you are destroying the actor before other rules can run.

    Instead of:
    When [condition]
    Destroy actor
    [Important behaviors]

    You should always list the Destroy actor rule last:
    When [condition]
    [Important behaviors]
    Destroy actor

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

  • fabiookamurafabiookamura Member Posts: 5
    I changed destroy actor to last, but but the problem still there.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I would recommend doing some debugging using DisplayText and Log Debugging Statements. Start by watching (with DisplayText) the value of game.lives (or whatever you called it) and add a Log Debugging Statement immediately before and after you think it should change scene. Then check the log to see if those statements ran.

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

  • fabiookamurafabiookamura Member Posts: 5
    edited December 2012
    I don't know how to use log debugging statement, well the life counter as displayed in top left, it'is decreasing correctly.
  • LooseMooseLooseMoose Member Posts: 224
    edited December 2012
    Your 'game over' scene may be corrupted. Have you tried changing the scene to a different scene when you lose all lives? If the scene is able to change to a different one you will need to remake your 'game over' scene because it is corrupt, but if it doesn't change you will know you have a coding error.
  • fabiookamurafabiookamura Member Posts: 5
    Yes, I try other scene, but the error continues there, even when i put "pause game" behavior the game freeze.
Sign In or Register to comment.