HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Creating a vote box to select difficulty?

01-26-2004, 03:50 AM#1
shadow)ps(
in some maps a box appears in beginning and you can vote which difficulty setting you want. how do you do that?
01-26-2004, 03:58 AM#2
Narwanza
They are done using dialogs. And luck for you, in the new patch blizzard made dialogs 10000% easier to work with. Make a variable of type dialog. Then make an array variable of type dialog button. Now change the title of your dialog to whatever you want, and then add the buttons. After each button you add, set the dialog button array[number of button] = last created dialog button. Here is example.
Code:
...
Create a dialog button for DIALOG with the text Hard
set DIALOGBUTTONARRAY[1] = last created dialog button
Create a dialog button for DIALOG with the text Medium
set DIALOGBUTTONARRAY[2] = last created dialog button
...

Then make a trigger with the event, Dialog button clicked. Then see how many people voted for hard, medium and easy and depending on what you want to have happen you could do majority rule, you could do a compromise, whatever. I hope this helps.:D
01-26-2004, 05:15 AM#3
shadow)ps(
how do i make a trigger to hide the vote box specifcally to the player that voted already.

and how do i get around ties? right now i have conditions like

Box1 greater than box 2
box1 greater than box 3

if they tied, the triggers wont fire right?

so how do i get around it?
01-26-2004, 08:58 AM#4
Dimples
Try Box# equal to Box#?
01-26-2004, 05:39 PM#5
shadow)ps(
could you give me the entire trigger code please?