Table Problems

Firstly, I apologize for the size of the images! What I'm trying to do is, when a level is beat, change a table cell value from true to false, which will make a button turn from grey to blue. However, for some reason, the table value wont change during play and the button will remain grey, but when I manually go in to the table and select it true, it's blue. Any help would be appreciated!

image
image

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    Are you sure that game.Selected Level is 1 when you run that Change Table Value rule? I'd try deleting that behavior and adding it back in. Maybe the attributes didn't get selected properly or got changed (e.g. a space added to the name). Just a guess...

    Actually, looking at it again, you have a bunch of conditions for that rule. Add a Log Debugging Statement before the Change Table Value to verify that that rule is actually firing. Is it?

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

  • tylerglessnertylerglessner Member Posts: 246
    Yep, selected level remains 1. Tried deleting the rule and it persisted. Also added a Log Debug and all are firing!
  • kolabokolabo Member Posts: 240
    Hmmm, I'll give this a try.

    I'm looking at your code and notice this:
    - In your table you are saving to a boolean in table row "game.Selected Level"
    - and your "self.Easy" attribute is getting a true or false from a row "self.Name" in the same table.

    From what I can see of your coding, you are not getting a true or false from the same place you are writing to.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    So the next troubleshooting step would be to log or display the value of that table cell and see if it is being changed by the Table Cell Value behavior.

    I'm quite familiar with your game, Tyler, so if you want to send it over to me I'd be happy to take a look.

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

  • tylerglessnertylerglessner Member Posts: 246
    @tatiang @kolabo thanks fellas! I think I figured it out. I was using a change attribute to save a self attribute to true, which would change the image. Seems like its working now that I added a timer to update it every 0.1 seconds!
    image
Sign In or Register to comment.