ForumsProgramming Forumhow do i make a money/store system in flash game?

3 2970
staticzone
offline
staticzone
67 posts
Nomad

hey guys, i need some help on how to make a money/store system in flash game I'm making. like when you have 50g you can buy a health potion that will appear in your next battle and you can use it depending on how many potions you buy. or can anyone provide a general guide line for a inventory system similar to the one in Diablo, for example how do I manage the seperate slots effecient,- how do I store the values?
Thanks

  • 3 Replies
HAXALLNOOBS
offline
HAXALLNOOBS
19 posts
Nomad

I can helf for if you want to buy the object.
Make a button with a picture of the object and give it this code...

On(press){
if(_root.money >= 50){
_root.healthpotions += 1;
_root.money-=50;
}
}


Do you want to have a certain amount you can buy???

staticzone
offline
staticzone
67 posts
Nomad

oh ok thx but how do u have it appear in your inventory or somthing so u can use that potion during your battles. Thats what im trying to figure out

dank
offline
dank
983 posts
Peasant

It's up to your choosing. You can have a mc and object mc's inside it and turn them on/off with their visible attribute. Or you could add and remove the mc's and re-render the objects in the inventory. Or you could create a huge grid with a multi-dimensional array behind it that holds objects.

The options are limited to your imagination. But all the best ways will usually involve an Array or two, so I recommend reading up on those first.

Showing 1-3 of 3