How do I create an in-game store

Get help using Construct 2

Post » Sun Mar 23, 2014 4:41 am

So I actually have the mechanics down but there is one thing that I am having an issue with. So when I purchase a character and click the buy button on said character the buy button disappears as it is supposed to but when I go back into the store the buy button is back and it will allow me to buy that character again when I shouldn't be able to. I tried using the save and load options which works but not how I want it to. It will load the game back to the store rather than the beginning of the game. Also the buy button is back if I go into the game and then go back to the store. I hope this makes sense, any help is appreciated.
B
4
S
1
Posts: 27
Reputation: 504

Post » Sun Mar 23, 2014 7:45 am

I think you need to have a variable called Purchased attached to the character you wish to buy, and have the code read

If Purchased = false >>> Make Buy Button Clickable/Usable/Visable
else >>> Destroy Buy Button
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Sun Mar 23, 2014 12:27 pm

the solution of @emoaden is good but you might need to make an "array" not just a "variable", depending on how you made the layout/store.

also if you want Save/Load to Load you to the beginning of the game, you have to use "Webstorage" instead of Construct2's Save/Load... using it is a lot harder (even to test/debug) but I recommend to learn it especially if you want to make a big game.
B
10
S
1
G
1
Posts: 22
Reputation: 848


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 36 guests