Google Translate:

Script by 3ICE.




  • 12Oct

    Screenshot of the final product
    Select Difficulty Dialog Example

    We are going to create a dialog similar to the one you can see above. A dialog requires two separate triggers, one for initializing (setting up variables, adding a title, showing it to the desired player, etc) and an other for handling clicks on our buttons (Event: Dialog Button is Clicked).

    Lets start with variables! We will need an array of Dialog Buttons, I named it var_DialogButtonArray. We will also need a Dialog variable, let's call it var_Dialog. Of course you can use shorter variable names if you want. I for example always use one letter variables like b or d.

    Now all there is left is creating two triggers. You can download the example map from here. (or RoC version)

    The first trigger creates the dialog:

    The second trigger handles the Dialog Button Click Events:

    Replace the comments Easy, Medium and Hard with actual trigger functions, for example change Handicaps, Give extra gold, you name it.

    This tutorial was written by 3ICE.

    Posted by 3ICE @ 2:10 am

13 Responses

  • 3ICE Says:

    I have added a RoC demo map.


  • Polar Says:

    Thanks a lot! This helped me a lot with trigger variables in general.

    Edited by 3ICE: Corrected spellings of "alot", removed "you", removed "out", added "with".

  • OnlyWarCanDie Says:

    Nice :)

    I will think about using this one day :)

  • 3ICE Says:

    Well, hurry up, because as soon as StarCraft 2 comes out, WarCraft 3 will receive a population drop of about 75%!

  • George Says:

    Does anyone know how to do this in the starcraft 2 editor?

    Edited by 3ICE: Fixed capitalization ("does" -> "Does") and punctuation ("editor ??" -> "editor?").

  • 3ICE Says:

    Sure. Same principle, bit more complex triggering. Dialogs are more powerful in SC2, so they require a little more settings to be usable. (Like specifying height and position) Here are some screenshots and a downloadable demo map to get you started:


    Trigger 1:

    Trigger 2:

    Download demo map:

  • Vince Says:

    does that work in starcraft 2 too ?

  • 3ICE Says:

    Spammer down! Vince, I have removed your website, as it clearly isn't yours. As for your question, read the comment above yours for the answer.

  • QuSo Says:

    Thanks for the tutorial man, I know it's a bit late to be starting on wc3 editing, but regardless, this probably saved me at least a few hours trying to figure this out. ^^

  • 3ICE Says:

    You are welcome.

    It is never too late, in fact I just recently started working again on my Fastest Map Possible.

    The rest of this comment was moved to my forum:

    Edited by 3ICE: Fuck they deleted my pictures. Changing to my own host…

  • 3ICE Says:

    Note: JASS is superior to GUI. It requires half as much work to create and store the button handles, because you can put the assign and create lines together:

    call DialogSetMessage("Difficulty", var_Dialog)
    set var_DialogButtonArray[0] = DialogAddButton("Easy", var_Dialog)
    set var_DialogButtonArray[1] = DialogAddButton("Medium", var_Dialog)
    set var_DialogButtonArray[2] = DialogAddButton("Hard", var_Dialog)
    call DialogDisplay(Player(0), var_Dialog)

    The above JASS code was not syntax checked, I probably got the number and order of parameters wrong. But it will do, for demonstration purposes only.

  • Draghici Andrei Says:

    Very nice, is very helpful but i want to make a button clicked by more then 3 players like if 5 players from 9 click easy then go easy. Please help! Thanks again for tutorial!

  • 3ICE Says:

    That's a vote system. On each click you increment the respective difficulty vote counter variable: easy_clicked, medium_clicked, or hard_clicked and also keep track of total_clicked. Once total_clicked equals the number of players in the game or 30 seconds have passed (protection from AFK players) you tally up the results, choosing the difficulty level that most players voted on.

Leave a Comment

Please note: If you post more than 5 URLs, then automated moderation will delay your comment for investigation. There is no need to resubmit the comment as it will be approved if found to be appropriate.