Game logic - Event listener – Ylands
Jump to navigation
Jump to search
No edit summary |
Lou Montana (talk | contribs) |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | |||
=Description= | =Description= | ||
Event listener is a special trigger, which is waiting for certain event to occur and then triggers. | Event listener is a special trigger, which is waiting for certain event to occur and then triggers. | ||
=Properties= | = Properties = | ||
===Execution limit=== | <!-- [[File:Game_logic_-_Event_listener.png|right|400px|Properties]] --> | ||
=== Enabled === | |||
*Defines whenever the trigger is activated or not. | |||
=== Execution limit === | |||
*Number of times event listener can be triggered, -1 sets to infinite. | *Number of times event listener can be triggered, -1 sets to infinite. | ||
===Listen for=== | === Listen for === | ||
*Type of event to listen for, supported events are: | *Type of event to listen for, supported events are: | ||
**'''Interaction with entity''' - Waits for a interaction occurring on target entity regardless the instigator. | **'''Interaction with entity''' - Waits for a interaction occurring on target entity regardless the instigator. | ||
**'''Player action''' - Waits for specific player action (e.g On Jump) | |||
**'''Player interaction with entity''' - Adds possibility to disgusting who can trigger the listener. | **'''Player interaction with entity''' - Adds possibility to disgusting who can trigger the listener. | ||
**'''Player interaction with 2 entities''' - Special variant for events with 2 targets (e.g. Link / Unlink energy) | |||
===Instigated by=== | === Instigated by === | ||
*Available | *Available for player interactions. | ||
*Distinguishes who can trigger the listener | *Distinguishes who can trigger the listener: | ||
**'''Any player''' - any player will trigger the listener | **'''Any player''' - any player will trigger the listener | ||
**'''Labeled player''' - player with | **'''Labeled player''' - player with specific [[Ylands:Game logic - Entity label|entity label]] | ||
**'''Player role''' - only specific player role will trigger the listener | **'''Player role''' - only players with specific [[Ylands:Game logic - Player role|player role]] will trigger the listener | ||
**'''Player team''' - only players of specific [Ylands Game logic - Player team|player team]] will trigger the listener | |||
===Target=== | === Target === | ||
*Specifies the source of event the listener is waiting for. | *Specifies the source of event the listener is waiting for. | ||
**'''Any | **'''Any entity''' - any entity. | ||
**'''Entity | **'''Entity class''' - specific entity class as selected from drop down menu. | ||
**''' | **'''Entity type''' - specific entity type, type is defined by picking an entity from scene, entity can be then deleted. | ||
**''' | **'''Specific entity''' - one selected entity. | ||
**'''Labeled entities''' - any entity with selected [[Ylands:Game logic - Entity label|entity label]]. | |||
**''' | |||
=== | === Events === | ||
* | *Defines which actions / interactions (events) the listener will wait for. It is possible to set listener to react to more that 1 event. | ||
=Event listener events= | = Event listener events = | ||
*[[Ylands Tile - Event Listener On Trigger|On Trigger]] | *[[Ylands:Tile - Event Listener On Trigger|On Trigger]] | ||
=Related instructions= | = Related instructions = | ||
*[[Ylands Tile - Game logic enabled|Get / Set Enabled]] | *[[Ylands:Tile - Game logic enabled|Get / Set Enabled]] | ||
---- | ---- | ||
{{Ylands | {{Navbox/Ylands}} | ||
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|13}}}} | |||
[[Category: Game Logic]] | |||
[[Category: Ylands 0.12]] | [[Category: Ylands 0.12]] | ||
Latest revision as of 22:16, 8 August 2024
Description
Event listener is a special trigger, which is waiting for certain event to occur and then triggers.
Properties
Enabled
- Defines whenever the trigger is activated or not.
Execution limit
- Number of times event listener can be triggered, -1 sets to infinite.
Listen for
- Type of event to listen for, supported events are:
- Interaction with entity - Waits for a interaction occurring on target entity regardless the instigator.
- Player action - Waits for specific player action (e.g On Jump)
- Player interaction with entity - Adds possibility to disgusting who can trigger the listener.
- Player interaction with 2 entities - Special variant for events with 2 targets (e.g. Link / Unlink energy)
Instigated by
- Available for player interactions.
- Distinguishes who can trigger the listener:
- Any player - any player will trigger the listener
- Labeled player - player with specific entity label
- Player role - only players with specific player role will trigger the listener
- Player team - only players of specific [Ylands Game logic - Player team|player team]] will trigger the listener
Target
- Specifies the source of event the listener is waiting for.
- Any entity - any entity.
- Entity class - specific entity class as selected from drop down menu.
- Entity type - specific entity type, type is defined by picking an entity from scene, entity can be then deleted.
- Specific entity - one selected entity.
- Labeled entities - any entity with selected entity label.
Events
- Defines which actions / interactions (events) the listener will wait for. It is possible to set listener to react to more that 1 event.
Event listener events
Related instructions