• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Vote system.

Status
Not open for further replies.
Level 3
Joined
Aug 14, 2006
Messages
29
Yo guys!

Im correctly working on a voting system. I have download WE unlimited to help me make one, but i dont think i understand it..

The basic of my vote is:

Question: Should peacekeepers be allowed?

answers: Yes, No

If there are major votes of yes, change owner of (some units) to play 4 (pruple)
Quest msg: Peacekeepers has been allowed!

Im sorry if this is a JASS script/code whatever.. but ive got no idea of what JASS is..
If theres major of no then,
Quest msg: Peacekeepers has not passed the vote, and is terminated.

I know this sounds big, but i would love your help guys!
 
Last edited:
Level 11
Joined
Jul 12, 2005
Messages
764
Do this with a dialog.
Three variables are being used:
VoteDialog - dialog
VoteButton - dialog button
VoteYes - integer

Trigger#1
Events:
Player 1 types -vote ... (or what event you want)
Actions:
Set title of VoteDialog to "Allow peacekeepers?"
Add a button to VoteDialog with text "Yes"
Set VoteButton = Last created dialog button
Add a button to VoteDialog with text "No"
For each integer from 1 to 12
-Show VoteDialog for Player(Integer A)
Wait 15 seconds
If - VoteYes is greater then 4
Then - **Allow peacekeepers
Else - **Don't allow peacekeepers

Trigger#2
Events:
A dialog button is clicked for VoteDialog
Condition:
(Clicked dialog button) is equal to VoteButton
Actions:
Set VoteYes = VoteYes + 1
 
Status
Not open for further replies.
Top