Reset Scenes?
AdnanH
Member Posts: 77
Im slightly confused so need some help.. basically i have set up a gameover screen so when the main actor collides with a certain object the initial scene changes to the gameover screen. i have a play again button along with a home button and whichever one i touch it doesnt reset the initial scene so the score stays the same and you basically be invincible? i need to know how i can reset the initial scene after changing scenes?:)
Comments
When you use Change Scene or Reset Scene behaviors, game attributes are not reset. You have to do that manually by using Change Attribute behaviors. So for example, if you have game.score equal to 1500 and you reset the scene, you need to do:
When [some condition] Change Attribute game.score to 0 Reset Scene
Any other attributes that need to be reset would be added before the Reset Scene behavior.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
im stuck again but on a different sort of reset:( im working on a quiz game and ive tried to make it reset the scene when the button is pressed but i cant make the letters reset?:S please help:D
What are "the letters?" Are they game attributes, table cell values, ...? How have you tried to reset them?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
they are table cell values.. i tried making a reset game attribute but it failed miserably:/
When dealing with table cells, the best thing to do is to use the Copy Table behavior to copy the entire master table to a table you'll use in all of your gameplay rules when the game starts. That way, it's a fresh copy each time.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
i went by this video..
i dont get the reset part though:( basically i have set a reset button in my scene so if the player makes a mistake they can reset the scene but it doesnt work it just stays how it is.. its my first app im trying to use tables so im not used to them..
Did you try this? Or did you not understand it?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
In all honesty I don't know understand it.. I'm new to tables so don't really know much about them:)
Let's say you have a table with the letters data called game.LettersTable. You would create a new table and name it game.LettersGameplay. On an initial scene, you would add a Copy Table behavior and copy game.LettersTable (the master table) to game.LettersGameplay. You would need to replace all instances of game.LettersTable in your rules with game.LettersGameplay. Then if you need to reset the game at another point, just do the same Copy Table behavior. The game.LettersTable never gets touched so its data is pristine and just used for resetting/restoring to the game.LettersGameplay table.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks a lot mate now I get it:-) I appreciate the help mate