Limen Framework 0.1 Help

ULimenDamageComponent

Overview

ULimenDamageComponent is an actor component that handles the application and processing of damage in the game. It manages active damage instances, applies damage based on parameters and damage types, and broadcasts damage events to other components or actors. This component is designed to be replicated for multiplayer environments.

Properties

Type

Name

Access

Description

FLimenDamageEvent

OnDamageReceived

BlueprintAssignable

Event triggered when damage is received.

Functions

Return Type

Signature

Description

void

EndPlay(const EEndPlayReason::Type EndPlayReason)

Called when the component ends play, cleaning up active damage instances and damage type instances.

void

TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)

Ticks the component, processing active damage instances and broadcasting damage received events.

void

ApplyDamage(AController* Instigator, AActor* Causer, const TSubclassOf<[ULimenDamageType](LimenDamageType.md)>& DamageType, const FDamageParameters& DamageParams)

Applies damage to an actor based on the provided parameters and damage type.

template<typename T> void SetDamageCalculationFunction(T* Object, TMemFunPtrType<true, T, float(const FDamageParameters&, const [ULimenDamageType](LimenDamageType.md)*)>::Type Callback)

Sets a function to calculate damage based on parameters and damage types.

void

SetDamageCalculationFunction(const TFunction<float(const FDamageParameters&, const [ULimenDamageType](LimenDamageType.md)*)>& InFunction)

Sets a function to calculate damage based on parameters and damage types using a lambda or function pointer.

Usage & Implementation Notes

  • This component is designed to be replicated for multiplayer environments, ensuring that all relevant damage events are broadcasted across the network.

  • The TickComponent function processes active damage instances and broadcasts damage received events, only running on the server authority.

  • The ApplyDamage function creates a new instance of the specified damage type and applies it based on the provided parameters.

22 May 2026