Reset Scene - Change Scene
Biby
Member Posts: 28
Hi,
Looks like Reset Scene is not working properly, it's not reseting the whole scene, it reset's only few attributes, as I understood it doesn't reset global attributes (game.right, game.jump, game.mytimer, game.screenshake, etc...)
And I don't think that there is any alternative to fix this situation except duplicate the same scene Ex: (Level 1 and Level 1 Copy) then change the reset scene rule to be a change scene to Level 1 Copy to give same result as reset scene, but still when I change scene Level 1 to scene Level 1 Copy it still doesn't work, it starts where the previous scene ends.
And that looks like Change scene is not working properly as well...
Any ideas ???
Thanks
Looks like Reset Scene is not working properly, it's not reseting the whole scene, it reset's only few attributes, as I understood it doesn't reset global attributes (game.right, game.jump, game.mytimer, game.screenshake, etc...)
And I don't think that there is any alternative to fix this situation except duplicate the same scene Ex: (Level 1 and Level 1 Copy) then change the reset scene rule to be a change scene to Level 1 Copy to give same result as reset scene, but still when I change scene Level 1 to scene Level 1 Copy it still doesn't work, it starts where the previous scene ends.
And that looks like Change scene is not working properly as well...
Any ideas ???
Thanks
Comments
When [condition to reset or change scene]
Change Attribute game.Score to 0
Change Attribute game.Lives to 3
Change Attribute game.LevelPassed to false
Reset/Change Scene
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Also When I change any attribute in Scene 1, it changes same automatically in Scene 2.
Any idea ?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
When I change any value or add rule or change attribute in Scene 1, I go check Scene 2 I find same edits took place in Scene 2.
If you're making changes to rules and you're editing a prototype actor, that is the expected behavior. If you're changing rules in an unlocked instance of an actor, then that should not be happening.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
In level one motion linear velocity = 500, in level 2 (scene 2) motion linear velocity = 300.
Game.Timers 20 secs. in scene 1 and 30 secs in scene 2 and etc...
If that is the expected behavior so how i would work on 30 levels (scenes) with different attributes if what i'm changing in one scene is automatically changing in all the other scenes ?!!!
Is that common or i'm doing something wrong ? and how would i fix it ?
Another option would be to build a table with the Attributes that need to be loaded/adjusted for each scene and load/update them from there at the start of each scene.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Game attributes do not reset from scene to scene. So if you have a custom timer and its value is 12 when the scene changes or resets, it will be 12 when the scene starts.
@jamie_c's suggestion of a table is the way to go if you have many such attributes to manage. Table cell values do not reset on their own and can therefore be used from scene to scene or even after the app has been exited provided you use a Save Table behavior.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User