Limen Framework 0.1 Help

ALimenWeapon

Overview

ALimenWeapon is a class representing a weapon in the LimenWeapons system. It inherits from ALimenPhysicalItem and adds functionality specific to weapons, including firing, reloading, and handling ammo updates. This class supports both single-shot and automatic firing modes.

Properties

Type

Name

Access

Description

FAmmoUpdateDelegate

OnAmmoUpdated

BlueprintAssignable

Delegate for when the weapon's ammo is updated.

FWeaponReload

OnWeaponReload

BlueprintAssignable

Delegate for when the weapon starts reloading.

FWeaponReload

OnWeaponReloadCanceled

BlueprintAssignable

Delegate for when the weapon reload is canceled.

FWeaponFireDelegate

OnWeaponFired

BlueprintAssignable

Delegate for when the weapon fires a shot.

FWeaponFireDelegate

OnWeaponCooldownOver

BlueprintAssignable

Delegate for when the weapon's fire rate cooldown is over.

TSoftClassPtr< ULimenWeaponFireMethod >

FireMethodClass

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters"

The class of the fire method used by this weapon.

TSubclassOf< ULimenDamageType >

DamageType

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters"

The damage type applied by this weapon.

float

BaseDamage

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", meta=(ClampMin="0"), Replicated

The base damage of the weapon.

float

SecondsPerShot

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", meta=(ClampMin="0"), Replicated

The time between shots in seconds.

int32

MagazineCapacity

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", meta=(ClampMin="0"), Replicated

The capacity of the weapon's magazine.

float

ReloadTimeInSeconds

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", Replicated

The time it takes to reload the weapon.

bool

bIsAutomatic

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters"

Whether the weapon is automatic or not.

TSubclassOf< ALimenAmmo >

CompatibleAmmo

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters"

The type of ammo compatible with this weapon.

int32

InitialAmmo

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", meta=(ClampMin="0")

The initial amount of ammo when the weapon is spawned.

float

WeaponRange

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", meta=(ClampMin="0"), Replicated

The range of the weapon.

float

ImpactDamageFalloffMultiplier

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", meta=(ClampMin="0"), Replicated

Multiplier for impact damage falloff.

float

FireSoundRange

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", meta=(ClampMin="0"), Replicated

The range at which the weapon's fire sound is heard.

float

AINoiseEventLoudness

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", meta=(ClampMin="0"), Replicated

The loudness of the noise event when firing.

TSubclassOf

RecoilCameraShakeClass

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters"

The camera shake class for recoil effect.

bool

bIsSilenced

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters", Replicated

Whether the weapon is silenced or not.

EInfiniteAmmoType

InfiniteAmmoType

EditDefaultsOnly, BlueprintReadOnly, Category="Weapon Parameters"

Type of infinite ammo support.

Functions

Return Type

Signature

Description

void

StartFiring()

Starts firing the weapon.

void

StopFiring()

Stops firing the weapon.

void

StartReloading()

Starts reloading the weapon.

void

StopReloading()

Stops reloading the weapon.

bool

IsFiring() const

Returns true if the weapon is currently firing.

float

GetSecondsPerShot() const

Gets the time between shots in seconds.

void

SetSecondsPerShot(const float NewValue)

Sets the time between shots in seconds.

float

GetReloadTime() const

Gets the reload time in seconds.

void

SetReloadTime(const float NewValue)

Sets the reload time in seconds.

bool

IsReloading() const

Returns true if the weapon is currently reloading.

bool

CanReload() const

Determines if the weapon can be reloaded.

bool

CanFire() const

Determines if the weapon can fire a shot.

TSubclassOf< ALimenAmmo >

GetCompatibleAmmo() const

Gets the type of ammo compatible with this weapon.

int32

GetCurrentAmmo() const

Gets the current amount of ammo.

int32

GetAmmoCountUntilFull() const

Gets the number of shots until the magazine is full.

float

GetBaseDamage() const

Gets the base damage of the weapon.

void

SetBaseDamage(const float NewValue)

Sets the base damage of the weapon.

float

GetWeaponRange() const

Gets the range of the weapon.

void

SetWeaponRange(const float NewValue)

Sets the range of the weapon.

TSubclassOf< ULimenDamageType >

GetDamageType() const

Gets the damage type applied by this weapon.

void

SetDamageType(const TSubclassOf< ULimenDamageType >& NewValue)

Sets the damage type applied by this weapon.

float

GetImpactDamageFalloffMultiplier() const

Gets the multiplier for impact damage falloff.

void

SetImpactDamageFalloffMultiplier(const float NewValue)

Sets the multiplier for impact damage falloff.

float

GetAINoiseEventLoudness() const

Gets the loudness of the noise event when firing.

void

SetAINoiseEventLoudness(const float NewValue)

Sets the loudness of the noise event when firing.

float

GetFireSoundRange() const

Gets the range at which the weapon's fire sound is heard.

void

SetFireSoundRange(const float NewValue)

Sets the range at which the weapon's fire sound is heard.

EInfiniteAmmoType

GetInfiniteAmmoType() const

Gets the type of infinite ammo support.

void

SetInfiniteAmmoType(const EInfiniteAmmoType NewValue)

Sets the type of infinite ammo support.

FVector

GetFiringLocation() const

Gets the firing location of the weapon.

Usage & Implementation Notes

  • The weapon supports both single-shot and automatic firing modes.

  • It handles ammo updates, reloading, and firing events through delegates.

  • The weapon can be silenced and has different types of infinite ammo support.

  • Camera shake is applied during firing to simulate recoil.

  • Network replication ensures that the weapon's state is synchronized across clients.

22 May 2026