Vote Action
Vote Action
Поля
| Поле | Тип | По умолчанию | Описание |
|---|---|---|---|
definition | Ref<VoteDefinitionEntry> | — | The vote definition to cast a vote on |
optionIndex | Int | 0 | The option index (0-based) to vote for |
refusedTriggers | List<Ref<TriggerableEntry>> | empty | Triggered instead of the triggers above when the vote is refused (poll closed, cooldown not over, ...). The triggers above and the modifiers only run when the vote is recorded. The player is also shown the closed or blocked message of the Vote Definition. |
Общие поля TypeWriter (criteria, modifiers, triggers)
| Поле | Тип | По умолчанию | Описание |
|---|---|---|---|
criteria | List<Criteria> | empty | — |
modifiers | List<Modifier> | empty | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
How to use it
The action casts a vote for the player who triggers it. optionIndex starts at 0. If the vote is recorded, the entries in triggers run and the modifiers apply, once, so put your reward or thank-you message there. If the vote is refused (the player cannot vote again yet, the poll is closed), triggers and modifiers do not run: the player is shown the closedMessage or blockedMessage of the Vote Definition and the entries in refusedTriggers run instead. An option that does not exist, or a definition without a data artifact, is refused without a message; refusedTriggers still run. Use criteria to hide the vote for players who should not take part.