Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Classes | Namespaces
Task_Attack.h File Reference

Atomic task that performs a melee/ranged attack on a target entity. More...

#include "../../IAtomicTask.h"
+ Include dependency graph for Task_Attack.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Olympe::Task_Attack
 Initiates an attack action on the current target entity. More...
 

Namespaces

namespace  Olympe
 < Provides AssetID and INVALID_ASSET_ID
 

Detailed Description

Atomic task that performs a melee/ranged attack on a target entity.

Author
Olympe Engine
Date
2026-03-08

Task_Attack reads the current target EntityID from "local:Target" in the LocalBlackboard, then logs the attack with the resolved damage and range values. The actual damage application is handled by the combat system; this task only initiates and logs the action.

Parameters (ParameterMap): "Damage" (Float) — damage amount (optional, default 10.0). "Range" (Float) — maximum attack range in units (optional, default 50.0).

Returns: Success after performing the attack action. Failure if ctx.LocalBB is null.

C++14 compliant - no C++17/20 features.

Definition in file Task_Attack.h.