Shop Glitch
Luke20w
Member, PRO Posts: 50
I have a shop set up in my game with the simple Rule- If touched and attribute game.money is greater than or equal to self.price then change attribute self.bought to true. There is a problem though. Whenever you switch scenes out of the shop and go back in, the self.bought attributes are not staying true. I am an experienced GameSalad user and i have tried to fix this for a long time. I have tried saving and loading the attribute and that just makes everything bought if you buy one thing. That is the only glitch left in my most recent game and I have a deadline to post it to the app store very soon. Please help!
Comments
You're not saving and loading the correct attributes. You'll need a separate key for each item/actor or (better yet) you'll need to use tables to keep track of which items have been bought.
If you're up against a deadline, you might want to pay someone to help you or you might want to become a Pro member and take advantage of http://support.gamesalad.com.
If you want more help on the forums, post screenshots of your load and save attribute behaviors. You'll need to upload them to a file-sharing service and then embed/post the links here.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks @tatiang
I just tried saving it on different keys and that doesn't work. Do you ave any other suggestions other than making a table?
@Luke20w As an experienced user of GameSalad, I'm sure you can appreciate that saying "it doesn't work" is not helpful information. I suggested you post screenshots which would give me and others here more information about how you're trying to do this. Another option is to post a link to download the project file. There could be something obvious about how you've set this up incorrectly that doesn't come across from back-and-forth forum posts. You might have the keys entered incorrectly or be using a rule condition while loading attributes (not usually necessary) or have an instance of an actor on a scene but be editing the prototype actor's rules, etc., etc. There are many possible causes of what you're describing.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Never mind it worked. Thank you
Glad to hear it. Any idea what was wrong? It might help other people in the same situation.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User