How do I create a weapon shop

Get help using Construct 2

Post » Tue May 27, 2014 3:05 am

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.

Image

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.
B
7
S
2
Posts: 32
Reputation: 541

Post » Tue May 27, 2014 4:24 am

I used this to create my inventory. Works great now.

https://www.scirra.com/tutorials/614/ar ... -inventory
B
56
S
15
G
13
Posts: 826
Reputation: 17,645


Return to How do I....?

Who is online

Users browsing this forum: jbr190, TRMG, valefor and 27 guests