I've been trying to make a trigger that responds when a dialog item is pressed, and have it do different things if I left-click, right-click or middle-button click it. Of course, to my dismay, the Dialog Item Used Event does not return what mouse button was clicked, only if Ctrl, Shift and/or Alt was being pressed while the dialog item was used. However, the Mouse Clicked Event returns the modifier keys and the mouse button clicked, but no Used Dialog Item, of course. So, I figured I could use both events at the same time, in the same trigger, but now all I get is red Trigger Error events.
My questions are:
Can I use 2+ events in one trigger? If so, when should/shouldn't I use it? (whichever is easier to answer)
I did a test were I made an trigger for the Mouse Clicked event and one for the Dialog Item Used event and had them send a text message to the chat area when the event fires. When I clicked my dialog item, I only got the Dialog Item Used message. Only when I didn't click on a dialog item, would I get Mouse Clicked. Which leaves me to believe that SC2 doesn't register mouse clicks for dialogs (which is just weird...). Hmmm, well if someone can still think of a way, or if you have answers to my first question(s), please let me know!
Thanks!
(Note: The Dialog Item Used event does not pass the key modifiers, such as ctrl, shift and alt. That was my mistake.)
I think I may have found a solution. I haven't had the time to test it yet, but I think it would go something like this:
RightClickDialogItemEventsUI-PlayerAnyPlayerclicksRightmousebuttonDown.LocalVariablesConditionsActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(MouseXpositionclickedintheUI)>=// Item Start X(MouseXpositionclickedintheUI)<=// Item End X(MouseYpositionclickedintheUI)>=// Item Start Y(MouseYpositionclickedintheUI)<=// Item End YThen-------// Actions for right clicking the dialog itemElse
Edit: But alas, ui clicks do not register when you click a dialog item.
Hey guys,
I've been trying to make a trigger that responds when a dialog item is pressed, and have it do different things if I left-click, right-click or middle-button click it. Of course, to my dismay, the Dialog Item Used Event does not return what mouse button was clicked, only if Ctrl, Shift and/or Alt was being pressed while the dialog item was used. However, the Mouse Clicked Event returns the modifier keys and the mouse button clicked, but no Used Dialog Item, of course. So, I figured I could use both events at the same time, in the same trigger, but now all I get is red Trigger Error events.
My questions are:
Thanks for any feedback!
Oh dear...
I did a test were I made an trigger for the Mouse Clicked event and one for the Dialog Item Used event and had them send a text message to the chat area when the event fires. When I clicked my dialog item, I only got the Dialog Item Used message. Only when I didn't click on a dialog item, would I get Mouse Clicked. Which leaves me to believe that SC2 doesn't register mouse clicks for dialogs (which is just weird...). Hmmm, well if someone can still think of a way, or if you have answers to my first question(s), please let me know!
Thanks!
(Note: The Dialog Item Used event does not pass the key modifiers, such as ctrl, shift and alt. That was my mistake.)
I'd also love to know how to do exactly this. If anyone knows, don't hold out on us!
I think I may have found a solution. I haven't had the time to test it yet, but I think it would go something like this:
Edit: But alas, ui clicks do not register when you click a dialog item.