How do I create a weapon shop

0 favourites
  • 2 posts
From the Asset Store
Futuristics Weapons Vol 1 includes 8 different weapons, in a total of 216 sounds
  • Hey there,

    Maybe someone can help me with this. It has been wracking my brain for the last few hours.

    I am trying to figure out the best way of creating a weapon shop for my game.

    Basically what I was thinking of doing was setting temp variables each time a weapon is viewed on the store. Then when they buy the weapon and equip it those temp variables become the permanent variables for stats.

    This would be a pain though as I would have to set the variables for each and every weapon I plan to have. And I plan to have a lot. Instead I would like to just pull the instanced variables from the object they just clicked on and set them as the permanent variables.

    I could copy and paste into each weapon event the commands to set the temp variables but I would still need to go in to them all and set wep1.str to wep2.str and so on. Making it a long and arduous process.

    You can see here how I have laid out the events for the shop for two weapons using the method I have mentioned above using temporary variables.

    I would then use these saved variables on the buy button event to set the permanent variables if bought and equipped.

    It would be great if I could grab the item being called in the event initializer for e.g on touch basic_bow and use it in the actions associated with it such as this.something when an object is called in the action itself.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I used this to create my inventory. Works great now.

    https://www.scirra.com/tutorials/614/ar ... -inventory

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