12-Jul-2023
The trigger_vote entity, when triggered, throws a vote window at the players where they can select either 'Yes' or 'No'. The question of the vote and the time till it will be evaluated can be customized.
Keyvalues |
OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.
Name targetname : Set name of trigger_vote so other entities can trigger it to start vote. Every trigger use-type works uniformly. Can be kill-targeted.
Vote Message message : Specify the question/message to vote on. You have to do line breaks ('\n') manually!
Time To Vote (Seconds) frags : Time, in seconds, till the vote result will be evaluated and the result's according target is triggered. This time is not skipped if the result is already certain for the amount of players currently on the server.
Percentage needed health : Specify the percentage of players who have to vote 'Yes' in order for its according target to be fired. Players who do not vote are ignored, meaning their voice counts as neither a 'No' nor a 'Yes' vote.
Yes Target target : Entity to trigger when the vote's result is 'Yes'. Trigger use-type is 'On'.
No Target netname : Entity to trigger when the vote's result is 'No'. Trigger use-type is 'On'.
No Vote Target noise : Entity to trigger when nobody voted on anything. Trigger use-type is 'On'.
Yes string (optional) m_iszYesString : If specified, overrides default 'Yes' button text to the one typed here.
No string (optional) m_iszNoString : If specified, overrides default 'No' button text to the one typed here.
Unlike other entities, trigger_vote sends 'On' output instead of 'Toggle'.