Game logic - Trigger zone – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "[[File:{{PAGENAME}}.png|right|400px|Properties]]↵" to "<!-- [[File:{{PAGENAME}}.png|right|400px|Properties]] --> ")
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Description=
{{TOC|side}}
= Description =
Trigger which fires when a object enters or exits its bounding area.
Trigger which fires when a object enters or exits its bounding area.


=Properties=
= Properties =
[[File:{{PAGENAME}}.png|right|400px|Properties]]
<!-- [[File:{{PAGENAME}}.png|right|400px|Properties]] -->
===Enabled===
 
=== Enabled ===
*Trigger will not fire if not enabled.
*Trigger will not fire if not enabled.


===Zone shape===  
=== Animated ===
*Shape of the trigger zone - box, sphere or capsule
 
* Allows to change Trigger Zone [[Ylands:Tile - Game logic position-rotation-scale|'''position / rotation / scale''']] in real time.
* Due to technical limitations '''dynamic''' zones are '''limited''' to:
** Players.
** Specific entities.
** Labeled entities.
 
=== Zone shape ===
 
* Shape of the trigger zone - box, sphere or capsule
 
=== Radius / Dimensions ===
 
* Size of the Trigger Zone boundaries.
 
=== Visible ===
 
* Makes the Trigger zone boundaries visible even in game.
 
=== Color ===
 
* 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 [[Ylands:Game logic - Entity label|'''label''']].
** '''Player role''' - will react to players of specific [[Ylands:Game logic - Player role|'''role''']].


===Radius / Dimensions===
=== Perform ===
*Size of the Trigger Zone boundaries.


===Dynamic===
* 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).
*Allows to change Trigger Zone [[Ylands Tile - Game logic position-rotation-scale|'''position / rotation / scale''']] in real time.
*Due to technical limitations '''dynamic''' zones are '''limited''' to:
**Players.
**Specific entities.
**Labeled entities.


===Visible===
=== Times triggered ===
*Makes the Trigger zone boundaries visible even in game.


===Color===
* Number of times trigger can be fired, -1 sets to infinite. Entering and leaving trigger always removes one use (they do not count separately).
*Color of Trigger zone boundaries (when visible).


===Is triggered by===
= Trigger zone events =
*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 [[Ylands Game logic - Entity label|'''label''']].
**'''Player role''' - will react to players of specific [[Ylands Game logic - Player role|'''role''']].


===Perform===
* [[Ylands:Tile - On Trigger Enter-Exit|On Trigger Enter / Exit]]
*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).


===Times triggered===
= Notes =
*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.
*[[Ylands Tile - On Trigger Enter-Exit|On Trigger Enter / Exit]]


=Notes=
= Related instructions =
*'''Enabled''' and '''Visible''' properties are '''independent''' on each other, meaning that is is possible to display even inactive Trigger zone.


=Related instructions=
* [[Ylands:Tile - Game logic enabled|Get / Set Enabled]]
*[[Ylands Tile - Game logic enabled|Get / Set Enabled]]
* [[Ylands:Tile - Game logic position-rotation-scale|Get Position / Rotation / Scale]]
*[[Ylands Tile - Game logic position-rotation-scale|Get Position / Rotation / Scale]]
* [[Ylands:Tile - Reset trigger zone|Reset Trigger]]
*[[Ylands Tile - Reset trigger zone|Reset Trigger]]
* [[Ylands:Tile - Get-Set zone visible|Get / Set Zone Visibility]]
*[[Ylands Tile - Get-Set zone visible|Get / Set Zone Visibility]]
* [[Ylands:Tile - Get-Set zone color|Get / Set Zone Color]]
*[[Ylands Tile - Get-Set zone color|Get / Set Zone Color]]




----
----
{{Ylands scripting navbox}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|19}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|13}}}}


[[Category: Game Logic]]
[[Category: Game Logic]]
[[Category: Ylands 0.12]]
[[Category: Ylands 0.12]]

Latest revision as of 21:16, 8 August 2024

Description

Trigger which fires when a object enters or exits its bounding area.

Properties

Enabled

  • Trigger will not fire if not enabled.

Animated

  • Allows to change Trigger Zone position / rotation / scale in real time.
  • Due to technical limitations dynamic zones are limited to:
    • Players.
    • Specific entities.
    • Labeled entities.

Zone shape

  • Shape of the trigger zone - box, sphere or capsule

Radius / Dimensions

  • Size of the Trigger Zone boundaries.

Visible

  • Makes the Trigger zone boundaries visible even in game.

Color

  • 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.

Perform

  • 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).

Times triggered

  • 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

Notes

  • Enabled and Visible properties are independent on each other, meaning that is is possible to display even inactive Trigger zone.

Related instructions