Reviews Overview
-
5 star
3
-
4 star
0
-
3 star
0
-
2 star
0
-
1 star
0
What do you buy here?
Weapon System behavior addon for Construct 2 and Construct 3.
What is Weapon System behavior?
It’s a Construct behavior that serves as manager of weapons and their properties. Designed for shooter games but can be used with any other game featuring weapons: guns, melee weapons, magical spells etc.
Why should you use it?
Imagine you want to make a game featuring plenty of different weapons and several can be owned at the same time. Each of them has different properties such as damage, rate of fire, ammunition capacity, reloading time etc.
This may require handling large amounts of variables and functions with lots of correlations. Moreover, let’s assume you want it to be a multiplayer game, where each player can loot a weapon of the defeated opponent, along with its properties such as currently loaded ammunition or upgrades applied. This makes such a system even more complicated.
With the Weapon System you can easily add, remove, alter, select and use weapons owned by a user (player/enemy/ally/whatever). It’s a behavior, therefore you can easily manage them independently for each instance.
Weapon System allows you to set and change on the fly any property of the weapon such as:
- damage,
- rate of fire,
- reloading time,
- ammunition amount,
- clip/magazine capacity,
or a custom property of your design if you like.
You can also remove the weapon and “drop” it, so it can be “picked” by another instance or object that has the behavior.
How do you use it?
There are three crucial events needed:
- set a “Register weapon” action to add weapons and their basic properties (id, name, damage, rate of fire, amount of ammunition) and add “Select weapon” action to indicate which one is currently in use,
- set “Shoot” action to indicate when a shot (attack) takes place - e.g. by clicking Left Mouse Button,
- set “On shot” condition to determine what happens on every shot - e.g. spawn a bullet.
Optionally, you can add more events to enrich your games weaponry:
- set reloading properties: reloading time, enable/disable auto-reload, what happens when reloading starts/ends/is in progress (e.g. play a reloading sound effect),
- manage spare ammunition,
- change specific properties: damage, ammo capacity, rate of fire or a custom stat of your design,
- trigger a shot using a currently selected weapon or another weapon indicated by its ID,
- register (add) weapons by loading the properties from a JSON string,
- drop (remove) the weapon and save it’s properties as a JSON string,
- trigger a shot with a currently selected weapon or other weapon of your choice by indicating its ID.
Want to be notified about updates?
Join our Discord server via the support link.