Page 1 of 1

how to make a game store, I could buy only once?

PostPosted: Thu Apr 26, 2012 7:06 pm
by ivanquo
how to make a game store, I could buy only once
I make shop at game,but i don't know hot to make that I could buy only once

Re: how to make a game store, I could buy only once?

PostPosted: Thu Apr 26, 2012 8:52 pm
by Ugotsta
There are a lot of ways to go about that. One way, you could add a "Purchased" boolean variable to each item in the store (assuming they're done with Sprites).

Then use a boolean check before user is allowed to purchase the item.

Re: how to make a game store, I could buy only once?

PostPosted: Thu Apr 26, 2012 9:33 pm
by ivanquo
Make boolean for every sprite,and to do that they are were all true?
or what?

Re: how to make a game store, I could buy only once?

PostPosted: Thu Apr 26, 2012 11:10 pm
by NingY
Whenever you add an instance variable, there's a default.
The default for boolean is false, but you can change it to true.
Then you can either hide the items or stop the buying process if they're purchased.

Re: how to make a game store, I could buy only once?

PostPosted: Fri Apr 27, 2012 5:30 am
by ivanquo
i try to make like you say,but nothing has changed