Endstar LUA API Documentation
Loading...
Searching...
No Matches
Npc Class Reference

Contains methods to modify the npc during gameplay. More...

Public Member Functions

void Kill (Context instigator)
 Kills the NPC by reducing its health to zero.
 
void SetCombatMode (Context instigator, int combatMode)
 Sets the combat mode for the NPC.
 
void SetDamageMode (Context instigator, int damageMode)
 Sets the damage mode for the NPC.
 
void SetPhysicsMode (Context instigator, int physicsMode)
 Sets the physics mode for the NPC.
 
void SetCanFidget (Context instigator, bool canFidget)
 Configures whether the NPC can fidget.
 
void SetDestination (Context instigator)
 Sets the npcs destination to the position of an instruction node.
 
void ClearDestination (Context instigator)
 Clears the NPC's destination.
 
Vector3 GetNpcPosition (Context instigator)
 Gets the current position of the NPC.
 
void SetNewWanderPosition (Context instigator, float distance)
 Sets a new wander position for the NPC within a specified distance of its current location.
 
void SetNewRovePosition (Context instigator, float roveDistance, float distancePerMove)
 Sets a new rove position for the NPC within a certain distance of an instruction node.
 
int GetNumberOfInteractables ()
 Gets the number of interactables associated with the NPC.
 

Detailed Description

Contains methods to modify the npc during gameplay.

Member Function Documentation

◆ ClearDestination()

void ClearDestination ( Context instigator)

Clears the NPC's destination.

Parameters
instigatorThe source context triggering this change

◆ GetNpcPosition()

Vector3 GetNpcPosition ( Context instigator)

Gets the current position of the NPC.

Parameters
instigatorThe source context triggering this change
Returns
The current position of the NPC.

◆ GetNumberOfInteractables()

int GetNumberOfInteractables ( )

Gets the number of interactables associated with the NPC.

Returns
The number of interactables.

◆ Kill()

void Kill ( Context instigator)

Kills the NPC by reducing its health to zero.

Parameters
instigatorThe source context triggering this change

◆ SetCanFidget()

void SetCanFidget ( Context instigator,
bool canFidget )

Configures whether the NPC can fidget.

Parameters
instigatorThe source context triggering this change
canFidgetIf set to true, the NPC can fidget.

◆ SetCombatMode()

void SetCombatMode ( Context instigator,
int combatMode )

Sets the combat mode for the NPC.

Parameters
instigatorThe source context triggering this change
combatModeThe CombatMode to set.

◆ SetDamageMode()

void SetDamageMode ( Context instigator,
int damageMode )

Sets the damage mode for the NPC.

Parameters
instigatorThe source context triggering this change
damageModeThe DamageMode to set.

◆ SetDestination()

void SetDestination ( Context instigator)

Sets the npcs destination to the position of an instruction node.

Parameters
instigatorThe source context triggering this change

◆ SetNewRovePosition()

void SetNewRovePosition ( Context instigator,
float roveDistance,
float distancePerMove )

Sets a new rove position for the NPC within a certain distance of an instruction node.

Parameters
instigatorThe source context triggering this change
roveDistanceThe maximum distance to rove.
distancePerMoveThe distance per move during roving.

◆ SetNewWanderPosition()

void SetNewWanderPosition ( Context instigator,
float distance )

Sets a new wander position for the NPC within a specified distance of its current location.

Parameters
instigatorThe source context triggering this change
distanceThe distance within which to find a wander position.

◆ SetPhysicsMode()

void SetPhysicsMode ( Context instigator,
int physicsMode )

Sets the physics mode for the NPC.

Parameters
instigatorThe source context triggering this change
physicsModeThe PhysicsMode to set.