Game logic - Event listener – Ylands
Jump to navigation
Jump to search
Description
Event listener is a special trigger, which is waiting for certain event to occur and then triggers.
Properties
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 interaction with entity - Adds possibility to disgusting who can trigger the listener.
Instigated by
- Available when Player interaction with entity set
- Distinguishes who can trigger the listener
- Any player - any player will trigger the listener
- Labeled player - player with certain Label
- Player role - only specific player role will trigger the listener
Target
- Specifies the source of event the listener is waiting for.
- Any Entity - any entity performing selected event will trigger the listener.
- Entity Type - only picked entity type performing selected event will trigger the listener.
- Specific Entity - one specifically selected entity performing selected event will trigger the listener.
- Labeled Entities - any entity of given Label performing selected event will trigger the listener.
Activate on
- Available when Player interaction with entity set
- Start - will trigger at the moment player starts doing an action. (e.g starts unpacking sleeping pad)
- End - will trigger at the moment player finishes doing an action. (e.g sleeping pad is unpacked)
- Blocked - will trigger if player tries to do action but he can not do it. (e.g tries open a locked chest)
- Interrupted - will trigger if player interrupts doing an action (e.g starts extracting resin but do not complete that)
Interaction
- Depends on the type of selected target entity, there are 2 default ones
- Damage - triggers if player causes damage to an entity
- Destroy - triggers when a player removes all the remaining HP from an entity
Event listener events
Related instructions