๐ Triggers
A trigger can be attached to a quest. A trigger is basically an action which gets executed when something happens.
For example, if you create a
What happens if the trigger activates?โ
Well, if the trigger is activated (so, if in the above example, the player dies), an
More advanced options for triggersโ
A trigger also has more advanced options. Not only can you set it that it should "trigger" when the player dies (via the
Actionsโ
Actions can be created and re-used outside of Quests. So basically, you create them with the
Practical Exampleโ
Let's create an action which fails the quest:
Then let's create a trigger in the fictional Quest
Basically, what happens now, is that when you have the Quest active, and you die, the Quest will fail for you.
Detailed explanation of the trigger add command in this exampleโ
The next argument, "Quest" is when that trigger should apply. With "Quest", it's enough to have the quest active for the trigger to activate. If I were to set this to "O1" instead of "Quest", it would only trigger if the Objective Number 1 is currently active. In our case, it does not matter, since Objective 1 is always active.
But in a Quest with 2 Objectives you could set it so Objective 2 depends on Objective 1. That way, objective 2 would be hidden until objective 1 is completed. If, in that Quest, you were to set this trigger to "O2", it will not trigger until you have reached objective 2 (by finishing objective 1 first). Pretty flexible, eh?
The next argument, "ALL" is the world it should apply to. If I set that to "world_nether" I would need to die in the nether for the trigger to activate. The last argument is simply the amount of deaths until it activates.