Trigger
Set conditions and parameters for Gimmick.
What is a Trigger?
Trigger has a function to detect what happened in the world or the action of the player and notify it as a message. Messages contain conditions and parameters that drives gimmicks.
The gimmick works when the target and identifier of the message sent by the trigger match the target and identifier of the message read by the gimmick.
Setting items common to triggers
Each trigger component has an item called Triggers, which allows you to set the target and content of the message.
1: Set the type of message to be notified.
2: Set the message value.
3: Add an item.
4: Replace this item with the one above.
5: Delete this item.
6: Replace this item with the one below.
The details of the setting items are as follows.
7: Target: Specify the type of notification target.
Target | Description |
---|---|
This | Notify this item with a message. Can only be set with Item Trigger. |
SpecifiedItem | Notifies a message to the set item. Set the target item in the Specified Target Item part. |
Owner | Notify the owner of this item with a message. The owner is the person who grabs or uses the item. For items created by CreateItemGimmick or ClusterScript.createItem of ScriptableItem, the owner of the item for which CreateItemGimmick or ScriptableItem is set becomes the first owner. Can only be set with Item Trigger. |
Player | Notify the player who executed the message. Can only be set with PlayerTrigger. |
CollidedItemOrPlayer | Notify the item or player who collided with this item with a message. Can only be set with the On Collide Item Trigger. |
Global | Notifies you of messages that can be read from all gimmicks. |
8: Key: Specify the identifier of the message.
9: Parameter Type: Specify the message type (value type). Depending on the gimmick, there are restrictions on the types that can be read.
Parameter Type | Description |
---|---|
Signal | Temporary message with no value. |
Bool | It is a value message that can be expressed by two values such as on / off. The value is set with the Bool Value checkbox. |
Float | A value message that can be expressed as a real number. Set the value to Float Value. |
Integer | A value message that can be represented as an integer. For the value, set Integer Value to an integer value. |
Vector2 | A value message that can be represented as a two-dimensional vector. For the value, set Vector2 Value to two numbers, X and Y. |
Vector3 | This is a value message that can be expressed as a three-dimensional vector. For the value, set Vector3 Value to three numbers, X, Y, and Z. |
The parameter type of the trigger must match the parameter type of the gimmick that reads the message.
By adding “.x”, “.y” or “.z” to the end of the identifier, each component of the vector type can be read and written as a Float value.
For some triggers, you can specify Input as the value. If Input is specified, the trigger will signal a message with a value that corresponds to the current state of the trigger.
List of triggers
Initialize Player Trigger
It is a trigger that determines the initial state of the player.
Interact Item Trigger
It is a trigger that adds a “use” function to items that cannot be grasped and notifies that it has been used.
Is Grounded Character Item Trigger
A trigger that tells you if an item is on the ground.
On Angular Velocity Item Trigger
A trigger that notifies you that the angular velocity of an item has changed.
On Collide Item Trigger
A trigger that notifies you that an item has collided with something else.
On Create Item Trigger
A trigger that notifies you when this item is created.
On Join Player Trigger
It is a trigger to notify when the player enters the room.
On Get Off Item Trigger
This is a trigger to notify you when you get off this item.
On Get On Item Trigger
This is a trigger to notify you when you get on this item.
On Grab Item Trigger
A trigger that notifies you when this item is grabbed.
On Receive Ownership Item Trigger
A trigger to notify you that you are the owner of this item.
On Release Item Trigger
A trigger to notify you when this item is released.
On Velocity Item Trigger
A trigger that notifies you that the speed of an item has changed.
Steer Item Trigger
It is a trigger that adds an “operate” function to the item on board and notifies that it has been operated.
Use Item Trigger
It is a trigger that adds a “use” function to the item you are holding and notifies you that it has been used.