Skip to content

Trigger (Entity Event)

Apex Aeon edited this page Feb 7, 2018 · 4 revisions

See Trigger (Disambiguation)

Trigger (Entity Event)

Description

Every entity has a method trigger(). When this method is called, that entity will usually perform an action, depending on the entity's internal data and the entity type. This is extremely important in making interactive content.

Behavior

The entity type Trigger detects when a player is standing withing a certain boundary. When the player is in the boundary, the Trigger entity calls the method triggerMain(<str:target>) with a string argument contained in the Trigger entity's "output" tag that is the name of the entity to be triggered. The triggerMain(<str:target>) then calls the trigger() method of every entity with a "name" tag equal to the target value. This means that if multiple entities have the same name, they will all be triggered, in order of their entity ID, which is based off of the order in which they are defined in the entities.json file.

Clone this wiki locally