Ylands:Game logic - Trigger zone
Jump to navigation Jump to search
Revision as of 16:36, 16 November 2022 by Lou Montana (Text replacement - "[[Ylands " to "[[Ylands:")
Trigger which fires when a object enters or exits its bounding area.
- Trigger will not fire if not enabled.
- Allows to change Trigger Zone position / rotation / scale in real time.
- Due to technical limitations dynamic zones are limited to:
- Specific entities.
- Labeled entities.
- Shape of the trigger zone - box, sphere or capsule
Radius / Dimensions
- Size of the Trigger Zone boundaries.
- Makes the Trigger zone boundaries visible even in game.
- Color of Trigger zone boundaries (when visible).
Is triggered by
- Setup what kind of entity passing the area will fire the trigger.
- Any animal / item / player / projectile etc.
- Entity type - after picking an entity, any instance of this entity will fire trigger.
- Specific entity - after picking an entity, only this specific instance (ID) will fire trigger.
- Labeled entities - will trigger only if trigger entity will be member of given label.
- Player role - will react to players of specific role.
- Governs if the trigger will react to incoming / exiting entity if there is already another entity in the zone. That entity must meet trigger rules (e.g if trigger is set to "ANY PLAYER" animals and other types will not block the trigger).
- Number of times trigger can be fired, -1 sets to infinite. Entering and leaving trigger always removes one use (they do not count separately).
Trigger zone events
- Enabled and Visible properties are independent on each other, meaning that is is possible to display even inactive Trigger zone.
- Get / Set Enabled
- Get Position / Rotation / Scale
- Reset Trigger
- Get / Set Zone Visibility
- Get / Set Zone Color