Shop HOW ?
frederic-saddi@live.nl
Member Posts: 12
Shop
How can I do an accessories shop in GS ? I tried a few things but i can't seem to make it work.
What I need is to have a buy button, if he has enough coins than he can touch it and it is a green button (I'll just call it G1) but if he doesn't have enough coins than it will change into G2 for example. But this is still simple to me the difficulty is to change the buy button G1 to an equip button E1 and to change an attribute so that i change an image. But if he has it already equipped he shouldn't be able to press E1 and it should change into E2.
PROBLEMS I HAVE BEEN HAVING:
- When i press the buy button it buys all of the accessories !
- When i equip an accessory it works but i change it and all of the accessories get equipped !
If someone could help me with this. It would be great if you could tell me what to do and maybe link me to a tutorial.
Thanks for reading this ! And if you answered than big thanks !
Comments
I can do the image bit with G1 TO G2. Im not really a pro so.
Rule
If attribute game.coins is greater than (howmuchitcosts)
Change image to G1 & change attribute game.coins to game.conins -(howmuchitcosts)
Otherwise
Change image to G2
Give that a go I'm no pro tho so don't count on it
It sounds like you might be using game attributes for your actors. If each actor has its own purchased boolean or other attribute that determines when it is purchased, use a self (actor) attribute instead.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
But how can I change that attribute from another actor ?
you could keep track of things in tables.
If an items corresponding cell = 0, it is not available to purchase.
If 1 it is available to purchase.
If 2 you've purchased it already.
ie.
then have a rule in your button that checks its corresponding cell to see what it's state is (0,1,2,)...
It's a start... anyway..