0 Favourites

How do I create a weapon pick up system

  • hello everyone I would like to create a system where the player has 9 weapon slots and as he picks up a weapon it will automatically be assigned to the next free slot so say the player has a knife and a pistol that is weapon 1 and 2 but if he picks up a shotgun that will become weapon 3 and if the player presses the next or previous weapon buttons they will go to the next available weapon. any help would be appreciated

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Are you familiar with arrays?

    They will work perfectly for this, you just have to learn how to manipulate them: https://www.scirra.com/tutorials/307/ar ... -beginners

  • I know the response was back in October but I needed to take a big break from game making for personal reasons and now I am back, I have spent the last hour trying to follow this tutorial

    Subscribe to Construct videos now

    unfortunately it has me stumped I was trying to follow it, I created an array, then a global variable, then I renamed the animation of my gun by adding the name ID_ just like it said I should but when it told me to write this line of code

    "ID_" & Arr_weapons.At(X)

    construct 2 won't reconise the expression X construct 2 won't recognize the expression X does anyone have a capx with a working weapon pickup system I can look at?

  • I don't know exactly how this might work, but I have a method that might work. When making a game, I like to skrew around with the Bullet Behavior, just figuring out different ways I can make the bullets work. For example, like when the bullet reaches a set length (or if you use a command) the bullet will spawn two other bullets, with the angle of motion being random. Try using different groups for different gun behaviors in the event sheet. When one gun is active, then that group will be active, while the others are deactivated.

  • You should be able to find multiple inventory examples if you search in tutorials, maybe even in other forum posts.

    That X that isn't being recognized is probably referring to some variable you are missing

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
234 61,222
DARKSETH's avatar
DARKSETH
Unread hot topic
152 19,230
Magistross's avatar
Magistross
Unread hot topic
99 10,136
karshinkoff's avatar
karshinkoff