Ok so my problem is with the trigger editor and it is hero selection. I make the dialog and dialog items all good with variable and buttons. I also noticed when i went to go to the event Dialog Item is Used i couldnt set my variable in there, but i managed to make it usable atleast help me on this too. Then when i go on the test document when i pick one of the buttons it somehow triggers all of them creating all my heroes instead the one i picked. Please Help if it is confusing ill explain it better if you want.
It is because you are using "any dialog" in the event. Sure you are not actually using "any dialog" but you are as good as since those functions must be returning it at the time the trigger is bound with the event. As such the trigger runs when any dialog is pressed.
Since it is not really possible to use that functionality in GUI, I would recommend using the any dialog is pressed event and then in the condition test if the event response dialog item is equal to the variable you stored the item handle in. This condition would evaluate false (so the trigger fails to run) for all but the dialog you want. It is not the most efficient I admit but it is by far the simplest and quickest solution.
Yes, even though they tried to improve the abstraction to couple you at a lower level it still hides a lot of useful features. I would recommend your script directly in Galaxy, the C style scripting language used for SC2 triggers however even that has its annoyances at times. Understanding Galaxy and how it works does help and certainly makes creating efficient and working GUI triggers quite easy.
EDIT: Yes that trigger is what I meant (last picture).
Ok so my problem is with the trigger editor and it is hero selection. I make the dialog and dialog items all good with variable and buttons. I also noticed when i went to go to the event Dialog Item is Used i couldnt set my variable in there, but i managed to make it usable atleast help me on this too. Then when i go on the test document when i pick one of the buttons it somehow triggers all of them creating all my heroes instead the one i picked. Please Help if it is confusing ill explain it better if you want.
It is because you are using "any dialog" in the event. Sure you are not actually using "any dialog" but you are as good as since those functions must be returning it at the time the trigger is bound with the event. As such the trigger runs when any dialog is pressed.
Since it is not really possible to use that functionality in GUI, I would recommend using the any dialog is pressed event and then in the condition test if the event response dialog item is equal to the variable you stored the item handle in. This condition would evaluate false (so the trigger fails to run) for all but the dialog you want. It is not the most efficient I admit but it is by far the simplest and quickest solution.
@ImperialGood: Go
OK thanks i will try that! I hate the trigger editor its so complex. Thanks! :D
Yes, even though they tried to improve the abstraction to couple you at a lower level it still hides a lot of useful features. I would recommend your script directly in Galaxy, the C style scripting language used for SC2 triggers however even that has its annoyances at times. Understanding Galaxy and how it works does help and certainly makes creating efficient and working GUI triggers quite easy.
EDIT: Yes that trigger is what I meant (last picture).
Since I don't think Imperial specifically mentioned it, the condition you want is "used dialog item".