Get a sample map including the dialog engine here.
If you know how custom text works, you can use v2.0 of my dialog engine.
I'll upload it when I feel like, but for now you can get it
here.
How to implement SuperIKI's dialog engine to your map
-
Create a few variables: They don't need an initial value.
- Dialog Button Array 'Button'
- Integer Array 'ButtonIndex'
- Trigger Array 'ButtonTrigger'
- Trigger Array 'dialoginput_buttonclicked'
- String Array 'dialoginput_buttonhotkey'
- String Array 'dialoginput_buttontext'
- Integer 'dialoginput_numberofbuttons'
- Player Group 'dialoginput_playerswhocansee'
- String 'dialoginput_title'
- Integer 'dialogreturn_buttonindex'
- Player 'dialogreturn_player'
-
Add the trigger 'Show Dialog'.
-
That's it.
How to create a dialog with this dialog engine
-
It's very easy. It's like: set dialoginput variables, then call the trigger.
If a button is clicked, you can use the dialogreturn variables to get to know who clicked it.
You must understand what the variables stand for:
- dialoginput_title
- The title of the dialog you want to create
- dialoginput_numberofbuttons
- The number of buttons it shall have
- dialoginput_buttontext
- The text on the buttons. dialoginput_buttontext[0] is the text on the first button.
- dialoginput_buttonhotkey
- The hotkey for the buttons. dialoginput_buttonhotkey[0] is the hotkey for the first button. They should be simple one character strings, such as "a" or "1".
- dialoginput_buttonclicked
- The trigger for the buttons. dialoginput_buttonclicked[0] is the trigger that is called when the first button is clicked.
These triggers are added to the trigger queue, so the last action should be 'remove this trigger from trigger queue'.
These triggers will be called when a player clicks on a button.
- dialoginput_playerswhocansee
- These are the players the dialog is shown to.
-
OK, when a button is clicked and the trigger you specified with 'dialoginput_buttonclicked' is called, you can access several variables:
- dialogreturn_buttonindex
- The index of the clicked button. If the first button was clicked, it's 0. (2nd button -> 1 and so on)
- dialogreturn_player
- The player that clicked on the button
-
Choose your event and then set it up like this:

or with hotkeys and colours:

You must set all variables before calling 'Show Dialog'!
Even the hotkeys. If you don't want hotkeys, set them to an empty string.
Notice: The first button has index 0, the second has index 1, and so on.
-
You can access who pushed the button by referring to variables like this:

You must delete the trigger from the trigger queue after using! Do it like shown above.
SuperIKI's WarCraft III website