Practical guide
Set up a weapon and ammunition
Connect a weapon definition to an item, an equipment slot and a source of reserve ammo.
SGF 1.0.1 · Unreal Engine 5.8 · Reviewed
You can equip a test weapon, fire a shot and reload from a known reserve.
On this page
A weapon definition sets up how the weapon fires, which fire modes it offers and how it reloads. The item represents the particular weapon the character owns. Start with one weapon, one ammo type and a target in a quiet test map.
Connect a weapon to its item
- Create an equippable item and set up its held visual. Choose the slot you will use.
- Create a weapon definition in the weapon authoring tools. Pick a single fire mode, a small capacity and a simple shot setup. Add a catalogue entry that maps your item’s definition to the weapon definition.
- Set up the equipped-weapon connection on your test character. In Play, equip the item and check that the weapon is available, then unequip it and check that firing is unavailable.
- Set up the inventory ammo provider and map the weapon’s ammo type to an item you can place in inventory. Test a shot, a reload with ammo and a reload with an empty reserve. When the same weapon is unequipped and re-equipped, check that its loaded ammo is retained.
Decide what a hit does
SGF can report where a shot lands. Choose which targets react, what damage or effect they receive and what the player sees. Test a valid target, a miss and an obstruction before adding more weapons.
Try a throwable
StormDeployables contains the grenade foundation. Use a grenade definition and component for a small prototype. If grenades come from inventory, map one supply item through the inventory connection. Test one release against an open and a covered target, and confirm that using a grenade consumes one unit.