Table hints and tips

When it comes to tables, what is recommended I put in rows and what do I put in columns? For example a set of related stats should be written by row or column? I got this funny feeling that listing stats in the wrong part can have you remaking the entire thing all over again when it turns out some feature or function only works a certain one. I tried studying some games that use tables, but I think there must be some kind of error or data is missing because something isn't right.

Comments

  • FrantoFranto Member Posts: 779
    To be blunt, "No editable tables exist" is the message I get in a rule or anything that utlizes tables in the examples I have. I can't really learn much from these. I'm guessing the tables didn't go through when I downloaded the samples or its a windows/mac incompatibility.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    To answer your first question, it doesn't matter too much but one thing to keep in mind is that the Change Table Value behavior takes a single row attribute/expression but can have many column values. So if you plan to change many values at once in a rule, you'd be better off having data for one "thing" in a row of many columns. For example, if you have separate characters in your game and store data for them, you could have row 1 be the player and row 2 be an enemy, with column 1 for health, column 2 for power, etc. Or if you had a game with many levels, row 1 could be level 1, and row 2 could be level 2, with column 1 for speed, column 2 for time limit, etc.

    The idea, then, is that you might have a Change Table Value behavior inside of a rule that updates everything at a certain point of your game and uses game.playerNumber or game.Level (both integers) for the row number and includes all relevant columns.

    Hope that's not too confusing!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • FrantoFranto Member Posts: 779
    @Tatiang Thanks, how did I not hear of change table values before, must have missed it.

    @FryingBaconStudios Thanks for the vid, also mentioning change table values, I could have sworn I have not seen such a behavior before.
Sign In or Register to comment.