Weapons System

This forum is currently in read-only mode.
From the Asset Store
Create complex dialogues with ease with this tool/template!
  • So i was wondering if anyone had any ideas on making a COD style weapons system? You have 2 slots for weapons and can switch any weapon you find with a weapon you're currently holding. I've tried some ideas with it but i couldnt get anything working.

  • Global variables - one for each weapon slot and one that says which slot is active. As you pick up/switch/use weapons just consult the variable which tells the game which slot to use.

  • OK i tried that out and it seems to be the best option so thank you.

    I was wondering if you could post a .cap or maybe go into more depth because im still struggling a bit. i could be missing something obvious here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Heh, I was being kinda vague to promote thinking about the problem and thus make it easier the next time.

    But ok, made you a cap - it's not really commented (for now?), but at the same time it's simple enough: Grab it!

    So what you have there is a little tank that has two weapons bays - currently there are two types of weapons - a rapid fire gun and a slower spread shot. Each bay can have either weapon and you can switch between the bays by Right clicking.

    To test the pickup system random weapon pickups gets spawned every 3 seconds. I haven't put much thought into them so sometimes you pick one up and the next one spawns right on top of you, etc. But anyways - you can pick up the weapon and it'll replace the weapon in your current bay and become the active weapon.

    Have a look around, let me know if anything is unclear. I may improve it in the background, but the general idea will stay the same.

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