Attributes from the Game level vs the Scene level

Hi everyone,
Say I have a bunch of Scenes in my Game, each Scene being a different "level" (that's basic and logical, yes?). Say each level/Scene has a unique attribute - "Points to win," for example. This Attribute cannot be set at the Game level because each Scene has a unique "Points to win" value.
The problem I'm running into is that I have Actors that need to look at the "Points to win" attribute - but Actors only can look at Game Attributes, not Scene Attributes. How do I get around this?
I guess I could create a new suite of Actors - "Change Game Attributes to Unique Values", a unique actor that I'd drag into each unique Scene that would simply have a set of commands to change the Game "Points to win" attribute to equal the Scene "Points to win" value, but that seems like a huge pain in the butt.
Any suggestions are greatly appreciated!
Thanks all.
Say I have a bunch of Scenes in my Game, each Scene being a different "level" (that's basic and logical, yes?). Say each level/Scene has a unique attribute - "Points to win," for example. This Attribute cannot be set at the Game level because each Scene has a unique "Points to win" value.
The problem I'm running into is that I have Actors that need to look at the "Points to win" attribute - but Actors only can look at Game Attributes, not Scene Attributes. How do I get around this?
I guess I could create a new suite of Actors - "Change Game Attributes to Unique Values", a unique actor that I'd drag into each unique Scene that would simply have a set of commands to change the Game "Points to win" attribute to equal the Scene "Points to win" value, but that seems like a huge pain in the butt.
Any suggestions are greatly appreciated!
Thanks all.
Best Answer
-
tatiang Posts: 11,949
or just put them in tables
This. Make a table that has each row (already numbered) with an integer value called "WinPoints". Then, have an invisible actor on every scene that has a rule with the condition when game.Score (or scene.Score) >= tableCellValue(TableName,game.CurrentLevel,"WinPoints") then ... change scene, etc. That way, as you increase the game.CurrentLevel value, the WinPoints are automatically set by that actor. The actor is a single actor with the same rules that is added to each scene.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers