1. Create a dialog
2. save dialog in a global variable (global means that it is defined where you add triggers and folders, it can be used everywhere in your triggers then)
3. add dialog items with the type button to the dialog
4. save the buttons in global variables. If you tick the array flag in a variable's definition, then you can make a list out of it. Then, if you store or read a value, you need to specify which position in the list you want to use. So, if you have 4 heroes, use an array of the size 4 in its definition and save the buttons in 1 to 4.
5. show the dialog to the players
-
6. Create a trigger with the event "Any player used dialog item clicked"
7. Check which saved button was used. Also, check if the dialog is visible for the player.
8. Hide the dialog for the player that used a button of that dialog. Then create the correct hero depending on the button used.
Arrays actually start from 0, but 1 might be easier to understand.
1. Create a dialog
2. save dialog in a global variable (global means that it is defined where you add triggers and folders, it can be used everywhere in your triggers then)
3. add dialog items with the type button to the dialog
4. save the buttons in global variables. If you tick the array flag in a variable's definition, then you can make a list out of it. Then, if you store or read a value, you need to specify which position in the list you want to use. So, if you have 4 heroes, use an array of the size 4 in its definition and save the buttons in 1 to 4.
5. show the dialog to the players
-
6. Create a trigger with the event "Any player used dialog item clicked"
7. Check which saved button was used. Also, check if the dialog is visible for the player.
8. Hide the dialog for the player that used a button of that dialog. Then create the correct hero depending on the button used.
Arrays actually start from 0, but 1 might be easier to understand.