I am trying to make a dialog button that once it is clicked you can use an ability just like the command card. I know how to do this for abilities that do not require a target, but how do you do it for ones that do? Thanks in Advance
Actually I personally think you are able to do that. Once you click the dialog button you could issue order to the unit of triggering player. I'm not sure but i think you can do it. Correct me if I'm wrong
as soon as you require a target you cannot use dialogs or you can use dialogs but then you have to register ulgy events to check for mouseposition and click which will lack badly in multiplayer maps. + i am not sure if you can emulate the mouse hover over the target unit aswell.
The only way for this to be feasible is you must know who you are targeting before issuing the dialog ability command.
Perhaps you could have the user select the unit and press some key like T for Target
Then you would need to determine if the target is a unit or point
then add some visual effect to that unit or point so they know who or where they are targeting.
and save the location or unit in a global variable.
To get a target point all you would need to do is store the x and y of the mouse location when the T button is pressed.
Once the Target is stored in a global variable you could issue an Order targeting unit or point
This way you would not need to track the mouse movement which causes a considerable amount of lag with 3 or more players.
Hello everyone,
I am trying to make a dialog button that once it is clicked you can use an ability just like the command card. I know how to do this for abilities that do not require a target, but how do you do it for ones that do? Thanks in Advance
-TerranMaster23
@TerranMaster23: Go
you cannot. this question has been asked 1000 times already (i think i did once too).
@FunkyUserName: Go
That sucks. Thanks for your reply
Actually I personally think you are able to do that. Once you click the dialog button you could issue order to the unit of triggering player. I'm not sure but i think you can do it. Correct me if I'm wrong
It is easily possible with Point-Blank and other abilities which doesn't require a target.
Additionally it is possible if you emulate the selection via triggers.
@Zanryu1337: Go
as soon as you require a target you cannot use dialogs or you can use dialogs but then you have to register ulgy events to check for mouseposition and click which will lack badly in multiplayer maps. + i am not sure if you can emulate the mouse hover over the target unit aswell.
@FunkyUserName: Go
yep, that's right, sadly
But still, it is possible, even if its bad
The only way for this to be feasible is you must know who you are targeting before issuing the dialog ability command.
Perhaps you could have the user select the unit and press some key like T for Target
Then you would need to determine if the target is a unit or point
then add some visual effect to that unit or point so they know who or where they are targeting.
and save the location or unit in a global variable.
To get a target point all you would need to do is store the x and y of the mouse location when the T button is pressed.
Once the Target is stored in a global variable you could issue an Order targeting unit or point
This way you would not need to track the mouse movement which causes a considerable amount of lag with 3 or more players.
Just a possible Workaround
@zaysite: Go
hmm... I see, But that is not going to be a lot of work for each ability, I would rather just change the UI.... even though I have no idea how.