|
Endstar LUA API Documentation
|
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 | SetDestinationTolerance (Context instigator, float newTolerance) |
| Configures the distance to a destination where the npc will stop moving. | |
| void | SetDestination (Context instigator) |
| Sets the npcs destination to the position of an instruction node. This method is obsolete. Use SetDestinationToCell instead. | |
| void | SetDestinationToCell (Context instigator, CellReference cellReference, Context fallbackContextForPosition) |
| Set the npcs destination to the position of the selected cell. If no cell is selected it will set the destination to the position of the fallback context. | |
| void | SetDestinationToPosition (Context instigator, Vector3 position) |
| Sets the npcs destination to the position in world space. | |
| void | SetDestinationToPosition (Context instigator, Vector3Int position) |
| Sets the npcs destination to the position in world space. | |
| 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. | |
| void | SetActivity (Context _, ActivityInstanceReference instanceRef) |
| Sets the activity the npc should go perform. The npc will path to the activity and start it once it gets there. | |
| void | SetActivity (Context _, ActivityInstanceReference instanceRef, bool teleport, bool kickOccupant) |
| Sets the activity the npc should go perform. The npc will path to the activity and start it once it gets there. | |
| void | SetActivity (Context _, ActivityData activityData) |
| Sets the activity the npc should go perform. The npc will path to the activity and start it once it gets there. | |
| void | SetActivity (Context _, ActivityData activityData, bool teleport, bool kickOccupant) |
| Sets the activity the npc should go perform. The npc will path to the activity and start it once it gets there. | |
| void | ForceStopActivity (Context instigator) |
| Stops the activity the npc is currently performing, ending its animation without completing it. | |
| void | SetUseActivities (Context instigator, bool useActivities) |
| Sets if the npc can use activities. | |
| void | SetActivityDelay (Context instigator, float delay) |
| Sets the delay between activities. | |
| PointOfInterest | GetTargetPointOfInterest () |
| Gets the interface for the NPC's target point of interest if it has one. | |
| bool | GetNextPointOfInterest (Context instigator) |
| Updates the NPC's target point of interest to one that it hasn't recently visited. | |
| void | SetDestinationToTargetPointOfInterest (Context instigator) |
| Sets the NPC's behavior destination to a point near its target point of interest. | |
| void | ClearBehaviorDestination (Context instigator) |
| Clears the NPC's behavior destination. | |
| void | ClearTargetPointOfInterest (Context instigator) |
| Clears the NPC's target point of interest. | |
| CharacterCosmeticProfile | GetCurrentCosmeticProfile () |
| Get currently active character cosmetic profile. | |
| void | SetCharacterCosmeticsOverride (Context instigator, CharacterCosmeticProfile value) |
| Overrides the npc's current cosmetics. | |
Contains methods to modify the npc during gameplay.
| void ClearBehaviorDestination | ( | Context | instigator | ) |
Clears the NPC's behavior destination.
| instigator | The source context triggering this change |
| void ClearDestination | ( | Context | instigator | ) |
Clears the NPC's destination.
| instigator | The source context triggering this change |
| void ClearTargetPointOfInterest | ( | Context | instigator | ) |
Clears the NPC's target point of interest.
| instigator | The source context triggering this change |
| void ForceStopActivity | ( | Context | instigator | ) |
Stops the activity the npc is currently performing, ending its animation without completing it.
| instigator | The source context triggering this change. |
| CharacterCosmeticProfile GetCurrentCosmeticProfile | ( | ) |
Get currently active character cosmetic profile.
| bool GetNextPointOfInterest | ( | Context | instigator | ) |
Updates the NPC's target point of interest to one that it hasn't recently visited.
| instigator | The source context triggering this change |
Gets the current position of the NPC.
| instigator | The source context triggering this change |
| int GetNumberOfInteractables | ( | ) |
Gets the number of interactables associated with the NPC.
| PointOfInterest GetTargetPointOfInterest | ( | ) |
Gets the interface for the NPC's target point of interest if it has one.
| void Kill | ( | Context | instigator | ) |
Kills the NPC by reducing its health to zero.
| instigator | The source context triggering this change |
| void SetActivity | ( | Context | _, |
| ActivityData | activityData ) |
Sets the activity the npc should go perform. The npc will path to the activity and start it once it gets there.
| _ | The instigator of the action. This is ignored in this case. |
| activityData | The data describing the activity to perform. |
| void SetActivity | ( | Context | _, |
| ActivityData | activityData, | ||
| bool | teleport, | ||
| bool | kickOccupant ) |
Sets the activity the npc should go perform. The npc will path to the activity and start it once it gets there.
| _ | The instigator of the action. This is ignored in this case. |
| activityData | The data describing the activity to perform. |
| teleport | If true the npc teleports into the activity's position instead of moving into it. |
| kickOccupant | If true the npc forces out any npc already occupying the slot it wants, instead of failing to start the activity. |
| void SetActivity | ( | Context | _, |
| ActivityInstanceReference | instanceRef ) |
Sets the activity the npc should go perform. The npc will path to the activity and start it once it gets there.
| _ | The instigator of the action. This is ignored in this case. |
| instanceRef | The reference to the activity instance to perform. |
| void SetActivity | ( | Context | _, |
| ActivityInstanceReference | instanceRef, | ||
| bool | teleport, | ||
| bool | kickOccupant ) |
Sets the activity the npc should go perform. The npc will path to the activity and start it once it gets there.
| _ | The instigator of the action. This is ignored in this case. |
| instanceRef | The reference to the activity instance to perform. |
| teleport | If true the npc teleports into the activity's position instead of moving into it. |
| kickOccupant | If true the npc forces out any npc already occupying the slot it wants, instead of failing to start the activity. |
| void SetActivityDelay | ( | Context | instigator, |
| float | delay ) |
Sets the delay between activities.
| instigator | The source context triggering this change. |
| delay | The new activity delay. |
| void SetCanFidget | ( | Context | instigator, |
| bool | canFidget ) |
Configures whether the NPC can fidget.
| instigator | The source context triggering this change |
| canFidget | If set to true, the NPC can fidget. |
| void SetCharacterCosmeticsOverride | ( | Context | instigator, |
| CharacterCosmeticProfile | value ) |
Overrides the npc's current cosmetics.
| instigator | The source context triggering this change |
| value | CharacterCosmeticProfile |
| void SetCombatMode | ( | Context | instigator, |
| int | combatMode ) |
Sets the combat mode for the NPC.
| instigator | The source context triggering this change |
| combatMode | The CombatMode to set. |
| void SetDamageMode | ( | Context | instigator, |
| int | damageMode ) |
Sets the damage mode for the NPC.
| instigator | The source context triggering this change |
| damageMode | The DamageMode to set. |
| void SetDestination | ( | Context | instigator | ) |
Sets the npcs destination to the position of an instruction node. This method is obsolete. Use SetDestinationToCell instead.
| instigator | The source context triggering this change |
| void SetDestinationToCell | ( | Context | instigator, |
| CellReference | cellReference, | ||
| Context | fallbackContextForPosition ) |
Set the npcs destination to the position of the selected cell. If no cell is selected it will set the destination to the position of the fallback context.
| instigator | The source context triggering this change |
| cellReference | The cell to direct the npc to move to |
| fallbackContextForPosition | The context of the fallback position object |
| void SetDestinationTolerance | ( | Context | instigator, |
| float | newTolerance ) |
Configures the distance to a destination where the npc will stop moving.
| instigator | The source context triggering this change |
| newTolerance | The new destination tolerance. |
Sets the npcs destination to the position in world space.
| instigator | The source context triggering this change |
| position | The position to set as the destination |
| void SetDestinationToPosition | ( | Context | instigator, |
| Vector3Int | position ) |
Sets the npcs destination to the position in world space.
| instigator | The source context triggering this change |
| position | The position to set as the destination |
| void SetDestinationToTargetPointOfInterest | ( | Context | instigator | ) |
Sets the NPC's behavior destination to a point near its target point of interest.
| instigator | The source context triggering this change |
| void SetNewRovePosition | ( | Context | instigator, |
| float | roveDistance, | ||
| float | distancePerMove ) |
Sets a new rove position for the NPC within a certain distance of an instruction node.
| instigator | The source context triggering this change. |
| roveDistance | The maximum distance to rove. |
| distancePerMove | The distance per move during roving. |
| void SetNewWanderPosition | ( | Context | instigator, |
| float | distance ) |
Sets a new wander position for the NPC within a specified distance of its current location.
| instigator | The source context triggering this change |
| distance | The distance within which to find a wander position. |
| void SetPhysicsMode | ( | Context | instigator, |
| int | physicsMode ) |
Sets the physics mode for the NPC.
| instigator | The source context triggering this change |
| physicsMode | The PhysicsMode to set. |
| void SetUseActivities | ( | Context | instigator, |
| bool | useActivities ) |
Sets if the npc can use activities.
| instigator | The source context triggering this change. |
| useActivities | The new activity use state. |