Reset scene problem
I have a scene problem...
I have a main menu - works fine
after you press the 'Press Start' text, the game goto to another scene called 'TALK' (this will eventually have a comic picture in it.
Next after that it goes to SCENE 1(The main game)
Now when I play SCENE 1 and my energy gets to zero i have an attribute (Boolean) called 'GAMEOVER', so I have it that when the energy bar gets to zero - change attribute GAMEOVER to TRUE.
NOTE - I also have a score that stats at zero and ranks up as you play - works
Now on all my gfx in the game i have a rule to turn all the gfx to the colour red when the GAME OVER attribute is TRUE- works great.
Then I have a big gfx called 'Game Over' which is a graphic of some text saying Game Over...this then fade in at the middle.
My score which I have won then scrolls upwards underneath the Game Over Graphic - all works great.
Now I have a timer that starts as soon as the Game Over graphic fades in...after 5 seconds - change scene to 'Main Menu. - This works great too, until this next big
The MAIN MENU starts again - goto scene 'TALK', after 5 second timer finishes it then loads 'SCENE 1' again.
I would expect to see a new fresh SCENE 1 but all I get is the screen that I saw at the end of the old game...I.E...the game screen with all the graphics red and my old score?
What am I doing wrong...been banging my head against a wall for 3 hours trying everything...
I have put a reset scene in but that just resets the scene constantly with a clicking noise...
The problem is though I need the score from the first game to use in my hi score table ...
Someone please help!!!
Thanks guys
I have a main menu - works fine
after you press the 'Press Start' text, the game goto to another scene called 'TALK' (this will eventually have a comic picture in it.
Next after that it goes to SCENE 1(The main game)
Now when I play SCENE 1 and my energy gets to zero i have an attribute (Boolean) called 'GAMEOVER', so I have it that when the energy bar gets to zero - change attribute GAMEOVER to TRUE.
NOTE - I also have a score that stats at zero and ranks up as you play - works
Now on all my gfx in the game i have a rule to turn all the gfx to the colour red when the GAME OVER attribute is TRUE- works great.
Then I have a big gfx called 'Game Over' which is a graphic of some text saying Game Over...this then fade in at the middle.
My score which I have won then scrolls upwards underneath the Game Over Graphic - all works great.
Now I have a timer that starts as soon as the Game Over graphic fades in...after 5 seconds - change scene to 'Main Menu. - This works great too, until this next big
The MAIN MENU starts again - goto scene 'TALK', after 5 second timer finishes it then loads 'SCENE 1' again.
I would expect to see a new fresh SCENE 1 but all I get is the screen that I saw at the end of the old game...I.E...the game screen with all the graphics red and my old score?
What am I doing wrong...been banging my head against a wall for 3 hours trying everything...
I have put a reset scene in but that just resets the scene constantly with a clicking noise...
The problem is though I need the score from the first game to use in my hi score table ...
Someone please help!!!
Thanks guys
It takes a Zombie to know a Zombie!!!
Comments
Trying to remember my stuff, you need to change everything back to what is was before you added the color. If i understand correctly, all your actors are red when you go to scene 1. So, you need to change it back to what it was originally.
As i am not able to access GS at this moment, this is what i can say:
Right before you switch scenes, change everything back to the way it was, this will need to be in a rule i believe.
OR! You could just make new graphics that ARE red. So when game is over, change image to red color gfx. Otherwise the nice gfx.
Hope this helps, its all i can do without GS in front of me.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Its not the colour thing...the whole scene re-starts when the score scrolls up under my 'GAME OVER' screen and then after 5 seconds goes back to the MAIN MENU (Like it should)
I then press 'PRESS START' to hopefully go back into a fresh new 'SCENE 1' but it keeps on going back to the graphics all red, GAME OVER gfx on screen and the score I achieved scrolling up underneath - 5 seconds pass and it starts all over again.
When it's GAME OVER I would have though changing the scene to the MAIN MENU would automatically reset the scene data but it doesn't...it gets stuck in the loop
Any ideas?
It takes a Zombie to know a Zombie!!!
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
It takes a Zombie to know a Zombie!!!
whats the difference between an integer and a boolean.
This problem is driving me nuts.
I would have thought changes scenes would reset them automatically?
It takes a Zombie to know a Zombie!!!
GS does not automatically reset variables, as that would mean the game would 'forget' everything between each scene.
I'll just have to keep on asking people what they think is going on with my game...
I just don't understand whey restarting a scene after you have just been in it means seeing the last part of the scene you were just in?
It takes a Zombie to know a Zombie!!!
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I think it might be something to do with the health attributes when it loads again, the health bar is zero, all the screen is red, as my 'Game over' attribute is set to do and the score is still the score I won when I played the scene last..
I think it's that but can't be sure..,losing the will to live now.
Was flying along with my app but now hit this giant wall
It takes a Zombie to know a Zombie!!!
Does that mean i should have set these attributes within the SCENE attributes?
I think the GAME OVER attribute would have been advisable to have within the GAME attributes..think i've done that correctly as I would need the score to carry across to other scenes and the high score table.
It takes a Zombie to know a Zombie!!!
I just don't get why its doing this...
Can anyone help me?
It takes a Zombie to know a Zombie!!!
Thanks for the tip.
It takes a Zombie to know a Zombie!!!
You were absolutely correct! I just can't believe it was that easy.
All I have done is do a change attribute for the health bar, score and Game Over boolean and on my splash screen (which appears before going into scene 1) the game now works a treat.
I can now go back and carry on!
Your a star!!!
It takes a Zombie to know a Zombie!!!