Modding:Entity Attribute guardedPlayerUid

From Vintage Story Wiki
Revision as of 00:16, 3 November 2024 by Bluelightning32 (talk | contribs) (Link to Entity_instance_attributes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The guardedEntityId entity instance attribute is used to mark which target entity the entity should guard. If the target is a player, then the guardedPlayerUid entity instance attribute is also set. Essentially the guarded entity is the owner of the entity. Out of the vanilla entities, only the hacked locust and mech helpers set the attribute.

Players with the clock maker class can set the attribute by hacking a locust. Players in creative mode can set it by placing a mech helper or hacked locust item (the item that spawns the entity).

AI tasks that use the attribute