Board Space Event Component: Difference between revisions

From Pummel Party Mod Documentation
Jump to navigation Jump to search
m (→‎How to Use: Made clear that this only works on custom board spaces)
(Remove outdated info)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
The board space event component is a [[:Category:Gameplay Components|gameplay component]] that allows a set of [[Action]]s to be performed whenever a player lands on a board mode. It is only usable in [[Board Mod]]s. The player must finish their turn on the board space for the actions to run; walking over the space will not run the actions.
[[File:BoardSpaceEventComponentExample.png|thumb|800px|right|This custom board space prefab has a board space event component added to the root gameobject in the prefab hierarchy. This will fire when this prefab is used by a custom board space.]]
The board space event component is a [[:Category:Gameplay Components|gameplay component]] that allows a set of [[Action]]s to be performed whenever a player lands on a custom board space. It can only be added from within [[Prefab Asset|prefabs]], as it is purpose is to add logic to [[Custom Board Space]]s (which exist as prefabs). Subsequently, it is only available in [[Board Mod]]s.  
 
The player must finish their turn on the board space for the actions to run; walking over the space will not run the actions.


=== How to Use ===
=== How to Use ===
[[File:BoardSpaceEventComponentExample.png|thumb|600px|right|This custom board space prefab has a board space event component added to the root gameobject in the prefab hierarchy. This will fire when this prefab is used by a custom board space.]]
This component should be placed on the <dfn title="The gameobject at the top of the hierarchy">'''root gameobject'''</dfn> of a prefab that is used as a custom board space. When attached to any other gameobject, it will do nothing.  
'''This component currently only works on a [[Custom Board Space]]. It will not work when added to a board space using a built-in board space type.'''


This component should be placed on the '''root gameobject of a prefab''' that is used as a custom board space. Attaching it to the prefab instance, or to a board node in the scene, will not callow the actions to fire.
Add actions to the component by editing the On Enter [[Event]] in the inspector window.
 
When attached to any other gameobject it will do nothing.


== Component Settings ==
== Component Settings ==
Line 14: Line 14:
! Property !! Description
! Property !! Description
|-
|-
|'''On Enter''' || A set of [[Action]]s to perform whenever a player lands on this space.
|'''On Player Land''' || A set of [[Action]]s to perform whenever a player lands on this space. This means when they end their turn on the space.
|-
|'''On Player Passing''' || A set of [[Action]]s to perform whenever a player walks over this space. This could be before ending their turn or when they have several steps to go. <br/> Note: This event is not triggered when riding a rocket over the space.
|-
|-
|}
|}


== Example Usage ==
== Example Usage ==
To make unique custom board spaces, you can use this component to affect the player in many ways. See the list of [[:Category:Actions|actions]] to get an idea of what actions can be performed. Note that not all actions are usable on board mods.
To make unique custom board spaces, you can use this component to affect the player in many ways. See the list of [[:Category:Actions|actions]] to get an idea of what actions can be performed. Note that not all actions are usable on Board Mods.


[[Category:Gameplay Components]]
[[Category:Gameplay Components]]
[[Category:Components]]
[[Category:Components]]

Latest revision as of 23:41, 21 November 2023

This custom board space prefab has a board space event component added to the root gameobject in the prefab hierarchy. This will fire when this prefab is used by a custom board space.

The board space event component is a gameplay component that allows a set of Actions to be performed whenever a player lands on a custom board space. It can only be added from within prefabs, as it is purpose is to add logic to Custom Board Spaces (which exist as prefabs). Subsequently, it is only available in Board Mods.

The player must finish their turn on the board space for the actions to run; walking over the space will not run the actions.

How to Use

This component should be placed on the root gameobject of a prefab that is used as a custom board space. When attached to any other gameobject, it will do nothing.

Add actions to the component by editing the On Enter Event in the inspector window.

Component Settings

Property Description
On Player Land A set of Actions to perform whenever a player lands on this space. This means when they end their turn on the space.
On Player Passing A set of Actions to perform whenever a player walks over this space. This could be before ending their turn or when they have several steps to go.
Note: This event is not triggered when riding a rocket over the space.

Example Usage

To make unique custom board spaces, you can use this component to affect the player in many ways. See the list of actions to get an idea of what actions can be performed. Note that not all actions are usable on Board Mods.