Skip to main content

Weapons

Weapons are types of Narrative Items you can create in your game. You have the option of selecting two options.

Weapon Item

The Weapon Item is used for Melee weapons.

Creation

To create a weapon item, you can Right-Click in your Content Drawer -> Narrative -> Narrative Items -> Weapon Item.

Ranged Weapon Item

The Ranged weapon item type is used for anything that has ranged attacks such as Guns, Magic, Long distance weapons.

Creation

To create a ranged weapon item, you can Right-Click in your Content Drawer -> Blueprint Class -> Ranged Weapon Item.

ranged-weapon-items.webp

Properties

Property NameTypeDescription
WeaponAnimLayerTSubclassOf<UAnimInstance>Anim BP we'll apply to the owner when the weapon is unholstered
WeaponVisualClassTSubclassOf<BP_WeaponVisual>Weapon visual actor to spawn
WeaponVisualAttachBoneFNameWeapon visual bone to attach to
WeaponVisualHolsteredAttachBoneFNameWeapon visual bone to attach to for holstered state
WeaponVisualAttachOffsetFTransformWeapon visual offset from attach
WeaponVisualHolsteredAttachOffsetFTransformWeapon visual offset from attach for holster
ConfigWeaponConfigThe configuration for the current weapon.
AttackDamagefloatBase damage this weapon should do
RequiredAmmoTSoftClassPtr<UAmmoItem>Ammo item class for this weapon
ClipSizeint32The amount of ammo loaded into the clip of the weapon
AmmoInClipint32The amount of ammo currently in the clip
TraceDataFCombatTraceDataWeapon trace distance when doing a hitscan
BashTraceDataFCombatTraceDataWeapon trace distance when doing a weapon bash

Config Properties

Property NameTypeDescription
AutomaticFireboolWhether the weapon fires continuously when the attack button is held down.
RateOfFirefloatThe rate at which the weapon can fire, typically measured in rounds per minute.
AttackDamagefloatThe amount of damage the weapon deals with each attack.
RequiredAmmoAmmoTypeThe type of ammunition required for the weapon to fire.
ClipSizeintThe maximum number of rounds the weapon's clip can hold.
AmmoInClipintThe current amount of ammunition loaded in the weapon's clip.
TraceDistancefloatThe maximum distance the weapon can hit a target using hitscan or trace mechanics.
TraceRadiusfloatThe radius of the weapon's trace or hitscan for determining hit detection.
BashTraceDistancefloatThe distance covered by the weapon during a melee bash attack.
BashTraceRadiusfloatThe radius of the weapon's trace during a melee bash attack for hit detection.

Functions

Can Fire

Check if the weapon can fire.

Is Holstered

Check if the weapon is holstered.

Reload

Update the ammo in our clip.

Wants Reload

Check if the weapon wants to reload.