Help needed! Tables, Coins.

vlasovlaso Member, PRO Posts: 19

Hey Guys,
Problem: When the game is reset, all coins disappear/it displays 0 coins.

My Code:
Currently I have an actor with the following to save and calculate the coins collected(att. coinCollected) and to save it to the table(Coins)

att. TValue is then displayed to show the total amount of coins.

Anything is appreciated, whether advice or solution! Thank you xo

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Are those behaviors inside of a rule or timer? If not, then they will fire right when the scene starts and only once thereby saving the default table cell value which is probably zero.

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

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    You're not saving the TBValue attribute. You're only saving the table. Try 1). Moving the save table above the change attribute. As tatiang said, if these are not in a rule, the change attribu

  • vlasovlaso Member, PRO Posts: 19

    Alright. Thank you for the advice, It helped! :smile: but I I figured another way to do it, I just added a couple things. Instead of a timer, I added a rule. (This is on the gameover screen) as well as a save attribute.

    and then added a load attribute on my home screen.

    It works perfectly :smiley:

    Thankyou,
    (This post was created for future people with same problem and trouble)

Sign In or Register to comment.