Semi-automatically generated modding documentation for Barotrauma

NPCFollowAction

Makes an NPC follow or stop following a specific target.

Attributes

Attribute Type Default value Description
NPCTag Identifier ”” Tag of the NPC(s) that should follow the target.
TargetTag Identifier ”” Tag of the target. Can be any type of entity: if it’s a static one like a device or a hull, the NPC will just stay at the position of that target.
Follow bool true Should the NPC start or stop following the target?
MaxTargets int -1 Maximum number of NPCs to target (e.g. you could choose to only make a specific number of security officers follow the player.)
AbandonOnReset bool true The event actions reset when a GoTo action makes the event jump to a different point. Should the NPC stop following the target when the event resets?
Priority float MaxObjectivePriority AI priority for the action. Uses 100 by default, which is the absolute maximum for any objectives, meaning nothing can be prioritized over it, including the emergency objectives, such as find safety and combat.Setting the priority to 70 would function like a regular order, but with the highest priority.A priority of 60 would make the objective work like a lowest priority order.So, if we’ll want the character to follow, but still be able to find safety, defend themselves when attacked, or flee from dangers,it’s better to use e.g. 70 instead of 100.