Setting up shop system (solved)

0 favourites
  • 3 posts
From the Asset Store
Easy to use shop and inventroy populated by an array!
  • Hi all, I'm trying to set up a shop in my game and I'm running into some problems refusing sales if the player doesn't have enough credits.

    Probably an obvious solution but it IS 1.30am and I'm knackered... <img src="smileys/smiley36.gif" border="0" align="middle" />

    Any ideas would be appreciated!

  • Posting a .capx would make answering your question possible, as you can do this in million ways and we have no idea how you've approached it... :)

    Here is one way:

    You probably got variable money on player object.

    on buy event > item.price

    .. buy


    .. play not enough money sound or something

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply! However, after a decent night's sleep I managed to figure it out. Basically the game checks if the global variable "Credits" is greater or equal to 100-shiphealth, and if so it does the repair. If not, it displays an error message.

    Cheers though! <img src="smileys/smiley1.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)