No edit summary
Line 1: Line 1:
'''Event Actions''' are a [[Systems|System]] in Housing that allow for [[Actions|Action]] chains to be ran on a player the moment an event happens, such as joining the house, dying, killing another player, or dropping an item. There are currently 18 Event Actions in Housing.
'''Event Actions''', or simply ''events'', are a system in Housing that allow for chains of [[actions]] to be triggered on a player when they fire a certain event within the house, such as joining, dying, getting a kill or dropping an item.


== Actions ==
== Actions ==
Many Action Events limit the selection of [[Actions]] you can add to them, such as the ''Group Change'' Action Event limiting the use of the ''Change Player's Group'' Action. This prevents the use of infinite loops(recursion) within Housing's [[Systems]].<!-- I'm not sure how to concisely get across which actions are supported by certain action events. -->
Many events prevent certain actions from being added, such as how Group Change disables the action Change Player Group. This is likely to combat [https://en.wikipedia.org/w/Recursion recursion], a way to infinitely loop something.
 
== Cancel Event Action ==
The ''Cancel Event'' [[Actions|Action]] is only available within select Action Events, and will sometimes prevent the event from occurring. For example, adding this action to the ''Player Death'' Action Event will prevent the player from dying. Adding this to [[Conditionals]] allows for complex scripting and control over many aspects of vanilla Minecraft gameplay.
 
This Action is supported within the ''Player Death'', ''Fish Caught'', ''Player Damage'', ''Player Drop Item'', ''Player Pick Up Item'', ''Player Change Held Item'', ''Player Toggle Sneak'', and ''Player Toggle Fly'' Action Events.
 
Despite its inclusion, this action does not function in the ''Player Toggle Sneak'' Action Event.


== Conditions ==
== Conditions ==

Revision as of 19:09, 3 September 2024

Event Actions, or simply events, are a system in Housing that allow for chains of actions to be triggered on a player when they fire a certain event within the house, such as joining, dying, getting a kill or dropping an item.

Actions

Many events prevent certain actions from being added, such as how Group Change disables the action Change Player Group. This is likely to combat recursion, a way to infinitely loop something.

Conditions

Many Action Events support additional conditions within Conditionals, allowing for actions to be run when an event is of a certain type or meets a certain criteria.

Additional conditions
Condition Settings Action Event(s) Additional Notes
Pvp Enabled - Pvp State Change -
Fishing Environment Water or Lava Fish Caught Lava fishing requires the lavaFishing gamerule to be enabled.
Portal Type Nether Portal or End Portal Enter Portal Players in survival mode will enter a Nether Portal after 4 seconds.
Damage Cause Various damage causes Player Damage -
Damage Amount Comparator and Compare Value Player Damage -
Block Type Block Selector and Type Requirement Boolean Player Break Block -
Within Region Region Selector Player Break Block This condition replaces the standard Within Region condition, testing for the broken block's location rather than the player's.
Is Item Item Selector, Metadata Boolean, Inventory Selector, and Required Amount Player Drop Item, Player Pick Up Item, and Player Change Held Item -