You can refference global variables from events (with custom script atleast). But it wouldn't make sence, since GUI events are added to triggers at map init, and at that point in time, your variable will have the value "No dialog item" - which is not what you want. Regardless of what the variable will be in the future, it is the value it has when the event is registered that counts.
I'm guessing this is why blizzard decided not to show them on the list - to avoid confusion.
The only way to do it in pure GUI is as suggested, use conditions. The only downside is that if you have 50 buttons, and one of them is pressed, 50 triggers will be run, and 49 of them will fail the conditions. Where with custom script, you can add the events after you create the button, and then only have 1 trigger run when you press the button.
For most cases, this is not an issue. It will probably be a tiny bit faster with just one trigger, but it will most likely be unnoticeable. Some people have been getting errors about too many triggers running at the same time when using the GUI way, but I think you will need to create a lot of dialog triggers before you run into that problem.
You can refference global variables from events (with custom script atleast). But it wouldn't make sence, since GUI events are added to triggers at map init, and at that point in time, your variable will have the value "No dialog item" - which is not what you want. Regardless of what the variable will be in the future, it is the value it has when the event is registered that counts.
I'm guessing this is why blizzard decided not to show them on the list - to avoid confusion.
The only way to do it in pure GUI is as suggested, use conditions. The only downside is that if you have 50 buttons, and one of them is pressed, 50 triggers will be run, and 49 of them will fail the conditions. Where with custom script, you can add the events after you create the button, and then only have 1 trigger run when you press the button.
For most cases, this is not an issue. It will probably be a tiny bit faster with just one trigger, but it will most likely be unnoticeable. Some people have been getting errors about too many triggers running at the same time when using the GUI way, but I think you will need to create a lot of dialog triggers before you run into that problem.