Attributes from the Game level vs the Scene level

frankwashburnfrankwashburn Member Posts: 32
edited March 2012 in Working with GS (Mac)
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.

Best Answer

  • tatiangtatiang Posts: 11,949
    Accepted Answer
    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

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You can either unlock an actor in the scene so you can access it. Or just have one game attribute thats your points to win, and change that to the appropriate amount at the beginig of each level
  • calvin9403calvin9403 Member Posts: 3,186
    or just put them in tables
  • frankwashburnfrankwashburn Member Posts: 32
    edited March 2012
    John,for changing the single variable to the appropriate amount at the beginning of each level, would I just have a scene-unique actor that does that within each scene?
Sign In or Register to comment.