"Reset scene" makes game to freeze.
mangasprai
Member, PRO Posts: 35
I am developing a game, i have two scenes, which are two stages, for now. For some strange reason, when i do "reset scene" on the first one, the game freezes. If i do it on the second one, everything is ok. Any idea on that? I don't have anything that makes the game to keep resetting so... what the...? it's a bit frustrating. (more than a bit ahah)
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Make sure you never attempt to reference column or row 0.
Duplicate the Scene, add a third row and point your logic to it?
Did the duplicate work?
Do you have a load screen or something that "initializes" or changes any attributes on your way to scene 1?
Example:
When my scene loads it changes my players health / armor to CurrentArmor/CurrentHealth.
The player Dies at 0 armor, 0 health.
Since my player was getting the health data, I figured it was all good.
It works once, the player dies... then keeps dying, because its health is 0 after reset scene.
When coming from the load screen, the player's health is set correctly.
When coming from a Reset Scene, I needed to change the attribute from 0 to 1 so the player would not die immediately upon scene start.
Now when player loads in, with 1 health, it immediately updates to the correct health without dying from being 0.
AAAlllllright then. Now my time is up, when i have 5 minutes free i try to describe the process the stage does before it starts. (table has no empty cells, they atleast have a 0 everywhere, and at first check no cell values are referring to row or column 0, always at least 1). I use , as tab row referral, a value "stagenumber" which by base is 1, and it's set before AND at the start of the stage itself, like: *when you press "next stage" set "stagenumber to itself+1", and to be sure it's correct, it's set also when the stage starts.
the stage that crashes is the first anyway.
scene 2 works,
1 and 3 do not.
Cool, now we have scene 3 to work with. Start deleting actors from scene 3, testing after each. When you find out that it works after deleting an actor, add back the others, testing after each one. To make sure that those actors are not part of the problem.
When you find the problem in scene 3, try the solution in scene 1.
You could also use extensive "Log Debugging Statements" to verify that your attributes are what you think they are.