From Pew-Pew to Ka-BOOM!
Welcome to the Shooter module guide. This is a rather complex system with many configuration options, which allow to create from a top-down perspective shoot 'em up like Hotline Miami to third-person adventure games like Uncharted or Tomb Raider.
There are two main objects in the Shooter module:
- Weapons: A configuration object that lets you define how a weapon is handled, which prefab is used and the States in which the character will pose when aiming with a particular weapon. Requires an Ammo object linked.
- Ammo: A configuration object tied to a weapon that defines how a particular ammunition type works, including the effects of shooting, charging a shot or whether it uses a crosshair, a visual trajectory, ...
To transition between different states you'll need to use the corresponding Action. If a Character tries to shoot when it's in a state that doesn't allow to shoot, the system will simply ignore the command.
Here's a quick example on how to make the Player draw the Sniper Rifle weapon that comes with the Shooter module when the user presses the E key.
(Toggling between pulling a gun and holstering it when the user presses the E key)
Disclaimer: This is just an example. You can decide how to trigger the drawing of the weapon, whether that's an automatic event as soon as the Player enters a zone, pressing a particular keyboard key or even as soon as the game starts. It's 100% customizable!