HPL3/Amnesia: Rebirth/Scripting/Agents/Ghouls

From Frictional Wiki
< HPL3‎ | Amnesia: Rebirth‎ | Scripting
Revision as of 07:37, 10 November 2020 by Crater (talk | contribs) (WIP - Started filling in mode specifications.)
Jump to navigation Jump to search


Wip icon.png Basic overview of agent


Basic Setup

Map Configuration

Scripting Setup

Important Functions

void Ghoul_Mode_Set(const tString &in asAgentName, eGhoulMode aMode, bool abForce = false)

Puts the ghoul into a mode, which determines its behavior when it's not reacting to the player's presence.

asAgentName: Name of the agent.
aMode: Which mode to put the ghoul in.
abForce: If true the ghoul will switch the behavior instantly regardless of state, otherwise it will do so more naturally on the next best opportunity.

Modes

eGhoulMode_Idle

Wip icon.png Overview of the mode.


Idle Functions

Wip icon.png Mode specific functions.


eGhoulMode_Patrol

A ghoul in patrol mode will move to specified patrol path nodes when not reacting to the player.

Patrol Functions

void Ghoul_ModePatrol_Setup(const tString &in asAgentName, bool abRandom = false, eGhoulSpeed aSpeed = eGhoulSpeed_Walk)

Sets up the basic parameters for the ghoul's patrol mode.

asAgentName: Name of the agent.
abRandom: If nodes should be picked randomly, otherwise they will be picked in the order added.
aSpeed: The speed with which the ghoul will move.

void Ghoul_ModePatrol_AddNode(const tString &in asAgentName, const tString&in asNodeName, float afMinWaitTime = 0, float afMaxWaitTime= - 1,
								const tString &in asAnimName = "", bool abLoopAnim = false)

Adds a node to the list of nodes to patrol in patrol mode.

asAgentName: Name of the agent.
asNodeName: Name of the node.
afMinWaitTime: The minimum amount of time how long the ghoul should wait at this node.
afMaxWaitTime: The maximum amount of time how long the ghoul should wait at this node.
asAnimName: Name of the animation that should play when the ghoul reaches this node.
abLoopAnim If the animation should loop.


  • Clears nodes PLACEHOLDER

eGhoulMode_StalkThroughHoles

eGhoulMode_Hunt

A ghoul in hunt mode will be always hunting the player.

eGhoulMode_Trapped

eGhoulMode_Enthralled

A ghoul in enthralled mode will move to a specific location when not reacting to the player.

eGhoulMode_Guard

eGhoulMode_RandomWanderArea

A ghoul in the random wander area will move to random path nodes within a specified area when not reacting to the player.