Skip to main content

Vote Action

Vote Action

Fields

FieldTypeDefaultDescription
definitionRef<VoteDefinitionEntry>—The vote definition to cast a vote on
optionIndexInt0The option index (0-based) to vote for
refusedTriggersList<Ref<TriggerableEntry>>emptyTriggered 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.
Common TypeWriter fields (criteria, modifiers, triggers)
FieldTypeDefaultDescription
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—
triggersList<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.