Game logic - Trigger zone – Ylands
Jump to navigation
Jump to search
Description
Trigger which fires when given object enters or exits its bounding area.
Settings
- Zone shape - shape of the trigger zone - box or sphere.
- Radius - Can be adjusted in the properties or via scale option.
- Is triggered by - setup on what kind of entity passing the area will fire the trigger. It is possible to combine several condition by using "AND", "NOT" and "OR" options. Other conditions include:
- Any animal / item / player /projectile
- 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 counts separate.
Events
- On Trigger Enter - Fires the trigger when entity enters the trigger zone.
- On Trigger Exit - Fires the trigger when entity leaves the trigger zone.
Literals
- Trigger Object - Instigator of the trigger execution.
Trigger Zone in Use
- Choose the Trigger Zone from the game logic tab and place it. With this game logic, positioning and size matters.
- Open its properties by double-clicking. Here you can ajdust the settings described above.
- Open its edit script window. Start with one of the two special event script tiles, than add some more, as you need. In this case, entering the triggering zone opens large door.