testing my game
sswisehaupt
Member, PRO Posts: 76
My game keeps track of totals and high scores. When i tested it kept track a few times when reloading. Then for some reason it reset all scores to zero when reloaded again. So every so often when it is reloaded it resets. How can I fix it.
Comments
How? Are you using Save and Load Attribute behaviors? Are you using Tables with Save Table behaviors?
Is this in Creator or on a mobile device?
It would help to see the rules you are using.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang I save my totals to a table
@tatiang On an ipad
Honestly, there is no way I can help you fix the problem if I can't see the problem itself. Short of posting screenshots or the project file itself, which you're welcome to do (upload either to a file-sharing site and then post the link here), you may want to do some troubleshooting along the lines of checking table values at various points in your game and also looking through your rules to see where you are resetting those values. Tables don't ever reset their values unless you restart the app. So if there are changing to zero, you have a behavior somewhere that is doing that. The trick is to find it.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang Thanks Ill check it. If not successful will send to you. Thanks
@tatiang here is a screen shot of my rules. Please help
https://www.dropbox.com/s/7zja87fg6m6ptkj/Screenshot 2015-05-15 13.59.19.png?dl=0
@tatiange here is a copy of my table.
https://www.dropbox.com/s/dz8bz3gv68zf45k/Screenshot 2015-05-15 14.02.03.png?dl=0
As a rule, I never destroy an actor and then place rules or behaviors after the destroy behavior. I always put the destroy behavior at the end/bottom of the rule.
I also can't tell from your screenshot what your Change Attribute behaviors do.
Is there a reason you're using the PurchaseTable instead of creating a new table?
The table screenshot link isn't working for me...
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiange no reason for me using the purchase table. Should I create a new table instead. I am attaching another table screenshot
https://www.dropbox.com/s/s0a8auxqv4p4jjf/Table 2015-05-15 14.02.03.png?dl=0
@tatiange Is this how I should do it:https://www.dropbox.com/s/bv0m3t461a9f8jj/Screenshot 2015-05-15 14.29.33.png?dl=0
@tatiange my change attribute behaviors:
game.newclownfish to game.newclownfish+1
game.totalclownfish to game.totalclownfish+1
The PurchaseTable is a built-in table to IAPs. Do not use it for anything but that. Create a new table instead.
The bigger problem is that your Change Table Value and Save Table behaviors are outside of your rule. Behaviors that are outside of any rules will trigger immediately and only once when the scene is loaded.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiange Is this better
https://www.dropbox.com/s/rmqk58g2gc7zggm/Screenshot 2015-05-15 14.48.35.png?dl=0
Thanks for all your help on this.
If I want to destroy this actor is it is not touched should I put that rule after or before the rule i just sent to you. Basically, after 5 seconds, destroy actor.
That looks better but you're still using the PurchaseTable.
The destroy after 5 seconds rule can go anywhere... it doesn't really matter because it's not ordered (it doesn't have to check the time either before or after something else happens). It would look like this:
Timer After 5 seconds
Destroy Actor
It doesn't actually need a rule condition since the Timer has a built-in condition (self.Time ≥ 5)
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang I'm setting up new table now. Thanks so very much for you time.
You're welcome!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User