• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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