Are there any benefits to using scene attributes over game attribute.
Comments
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
Hi, scene attributes values are forgotten once you've left the scene; so if you revisited a scene, the original values only would apply.
game attributes are remembered even when moving from scene to scene, so, for instance, if you have game.score which reaches, let's say, 251 in one level, then when moving to the next level and using a change attribute game.score to game.score + 10, it then becomes - of course - 262. Even if you returned to a previous scene, it would still be 262. Continuing through the game, whichever scene, it will always have its latest value remembered.
Comments
game attributes are remembered even when moving from scene to scene, so, for instance, if you have game.score which reaches, let's say, 251 in one level, then when moving to the next level and using a change attribute game.score to game.score + 10, it then becomes - of course - 262. Even if you returned to a previous scene, it would still be 262. Continuing through the game, whichever scene, it will always have its latest value remembered.
----------------------------------------------
http://www.davidgriffinapps.co.uk/
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
----------------------------------------------
http://www.davidgriffinapps.co.uk/
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps