Any ideas how to do this?
Quick explanation: unit targeted ability, 1 button/hotkey click - acts like normal unit target ability
but when u press ability button/hotkey 2 times quicky - it automatically casts on selected unit
Set a variable counter in you're trigger, and simply have it use an ability on the casting unit when the counter reaches 2. (The counter would be counting the times the button is pressed)
thanks, i dont wanna use this solution, because function description says: "Only register for this event when you absolutely need it, as it will generate network traffic from all players for every button they press."
i dont want such performance loss for a bit of usability, so would be nice if anyone have idea about another way how to it
Could you elaborate on how this ability works a bit more.
It's not a specific ability he is talking about. In Dota 2, many abilities which target a unit can be double-tapped, causing them to either be casted on yourself (your generic target heal/Buff/whatever) or to be casted in a specific direction (blink, teleport scrolls will tp to your base or in the direction of your base).
Could you elaborate on how this ability works a bit more.
Exactly what Kueken531 said: imagine a generic buff / heal / whatever unit targeting spell.
normally you press hotkey, select any unit with your mouse and ur unit start casting. But if you double-tap hotkey quickly - ur unit cast spell on itself, without targeting
Perhaps there is a way to do this using data but it would likely be complex and inefficient in design. You could alternatively do this by having two separate abilities, 1 that targets units, and 1 that self-casts. If you want it to be a double click thing perhaps you could try using temporary behaviors in conjunction with validators to get it to work but the problem with that is you would still have to target someone else with the initial click. Overall I don't think there is an all data method that is efficient but I could be wrong.
main idea is to avoid click anything if you double-tap - so u apply ability to yourself much faster
basically i need only to be able to place effect if button hotkey doubletapped OR detect it by triggers
or - i need to be able to use 2 abilities with 1 button
i made 2 abilities - cast target and cast self and then made button on unit to be Submenu with hidden self button, so my double tap is works, but i cant designate target for main ability, since its not ability command, but submenu =(
Err I meant double tap when I said double click above.
I don't see any way of doing this without separating the ability to 2 buttons or figuring out a way into getting data to switch between the two abilities somehow (this seems really hard to do without making players do something weirder than just double tapping). You could always do it hotkey based. Hotkey 1 is targeted and hotkey q is self-cast for example.
Also what you could do instead is make single tap be self-cast and double tap be targeted. You would need there to be a slight delay (perhaps 1/4th of a second?) before the abilities would be casted though. This could potentially be done all through data but with the delay triggers would probably be more efficient.
What if you made a toggle ability? For instance, activating the ability would enable another ability on the unit.
So you could take a ability like "Hold Fire", and then have a linked ability or event add another ability to the unit when this happens. Said ability will have the same hotkey, and it would function as if you double click.
thanks, nice idea about 1 tap is self-cast, and double-tap is targeted cast, unfortunately, it will make selfcast a bit delayed, which ruin all the idea about instafast casting (thats why i started this thread)
seperate abilities with different hotkeys, but same cooldown is what i'm using now, but dota2 style of selfcasting is much better:)
there's still a problem with making 1st tap targeting mode. i assume u're talking about behavior type ability, which have on/off buttons, double-tap there works, but i have no idea how to make 1st tap switch unit to targeting mode..
i need to mix on/off ability with effect-target somehow..
well, this selfcast is not critical (for making triggers watch every button pressed), i just want perfection :)
I don't understand you're issue with the "1st tap switch unit to targeting mode".
Do you mean you don't know how to make an ability with a target?
Also, there may be a way to tie in a dummy spell, or dummy unit.
On another note, are there no spells in SC, even in the campaign, that are auto self cast unless you target another unit? I can't think of any direct ones off the top of my head, but you may want to look into an ability such as the queen's transfuse and work from there.
If I think of anything else, i'll let you know.
Edit:
As for the dummy units mentioned, maybe add a dummy unit that is targeted when the hotkey is pressed, or an event from the spell to do something adding a counter, and when the counter reaches 2, with the condition of the spell not being on cooldown, you can cause it to target self that way.
He is referring to the selection of the actual target for a basic effect - target ability. You click the ability once, then you enter some sort of targeting mode, potentially displaying aoe and target indicators and allowing you to select the final target of the ability.
Unfortunately, this targeting mode is still somewhat unflexible, to my knowledge you cannot access it in any way other than pressing the button (or the respective hotkey). Also, once you entered that mode, you do not have access to any of the unit's other ability buttons until you either confirm the target, thus executing the ability, or cancel the targeting mode.
This results in your problem to be unsolvable with our current tools (again, only as far as I know). For hotkeys, you could maybe track them via trigger and execute the ability for a double-tapped hotkey, but that wouldn't allow double-tapping the button with the mouse, also you would need to check cooldowns manually etc...
The only 100% working option I can think of would be a workaround, something like simulating the targeting mode, possibly even the entire command card via trigger, so you can adjust it to your liking. This would have some issues of its own, for example dependency on mouse movement events which are not as responsive as the locally-executed targeting mode.
found UI - Player <Any Player> turns target mode <Any> for <Any Ability Command> event, yay
it allows me to enable catch hotkey trigger, but i need to cancel target mode somehow, so main quesion is - how to exit target mode? :O
Button in command card Cancel Target requires requirment, but i dont know what kind of requirment it needs O-o
Any ideas how to do this? Quick explanation: unit targeted ability, 1 button/hotkey click - acts like normal unit target ability but when u press ability button/hotkey 2 times quicky - it automatically casts on selected unit
@Fen1kz: Go
You can use triggers to do this.
Set a variable counter in you're trigger, and simply have it use an ability on the casting unit when the counter reaches 2. (The counter would be counting the times the button is pressed)
@silvermage: Go
thanks, i dont wanna use this solution, because function description says: "Only register for this event when you absolutely need it, as it will generate network traffic from all players for every button they press."
i dont want such performance loss for a bit of usability, so would be nice if anyone have idea about another way how to it
Could you elaborate on how this ability works a bit more.
It's not a specific ability he is talking about. In Dota 2, many abilities which target a unit can be double-tapped, causing them to either be casted on yourself (your generic target heal/Buff/whatever) or to be casted in a specific direction (blink, teleport scrolls will tp to your base or in the direction of your base).
Exactly what Kueken531 said: imagine a generic buff / heal / whatever unit targeting spell. normally you press hotkey, select any unit with your mouse and ur unit start casting. But if you double-tap hotkey quickly - ur unit cast spell on itself, without targeting
Perhaps there is a way to do this using data but it would likely be complex and inefficient in design. You could alternatively do this by having two separate abilities, 1 that targets units, and 1 that self-casts. If you want it to be a double click thing perhaps you could try using temporary behaviors in conjunction with validators to get it to work but the problem with that is you would still have to target someone else with the initial click. Overall I don't think there is an all data method that is efficient but I could be wrong.
@Imperfect1987: Go
main idea is to avoid click anything if you double-tap - so u apply ability to yourself much faster basically i need only to be able to place effect if button hotkey doubletapped OR detect it by triggers
or - i need to be able to use 2 abilities with 1 button i made 2 abilities - cast target and cast self and then made button on unit to be Submenu with hidden self button, so my double tap is works, but i cant designate target for main ability, since its not ability command, but submenu =(
@Fen1kz: Go
Err I meant double tap when I said double click above.
I don't see any way of doing this without separating the ability to 2 buttons or figuring out a way into getting data to switch between the two abilities somehow (this seems really hard to do without making players do something weirder than just double tapping). You could always do it hotkey based. Hotkey 1 is targeted and hotkey q is self-cast for example.
Also what you could do instead is make single tap be self-cast and double tap be targeted. You would need there to be a slight delay (perhaps 1/4th of a second?) before the abilities would be casted though. This could potentially be done all through data but with the delay triggers would probably be more efficient.
@Fen1kz: Go
What if you made a toggle ability? For instance, activating the ability would enable another ability on the unit.
So you could take a ability like "Hold Fire", and then have a linked ability or event add another ability to the unit when this happens. Said ability will have the same hotkey, and it would function as if you double click.
Let me know what you think.
@Imperfect1987: Go
thanks, nice idea about 1 tap is self-cast, and double-tap is targeted cast, unfortunately, it will make selfcast a bit delayed, which ruin all the idea about instafast casting (thats why i started this thread)
seperate abilities with different hotkeys, but same cooldown is what i'm using now, but dota2 style of selfcasting is much better:)
@silvermage: Go
there's still a problem with making 1st tap targeting mode. i assume u're talking about behavior type ability, which have on/off buttons, double-tap there works, but i have no idea how to make 1st tap switch unit to targeting mode..
i need to mix on/off ability with effect-target somehow..
well, this selfcast is not critical (for making triggers watch every button pressed), i just want perfection :)
@Fen1kz: Go
I don't understand you're issue with the "1st tap switch unit to targeting mode".
Do you mean you don't know how to make an ability with a target?
Also, there may be a way to tie in a dummy spell, or dummy unit.
On another note, are there no spells in SC, even in the campaign, that are auto self cast unless you target another unit? I can't think of any direct ones off the top of my head, but you may want to look into an ability such as the queen's transfuse and work from there.
If I think of anything else, i'll let you know.
Edit:
As for the dummy units mentioned, maybe add a dummy unit that is targeted when the hotkey is pressed, or an event from the spell to do something adding a counter, and when the counter reaches 2, with the condition of the spell not being on cooldown, you can cause it to target self that way.
It's a bit complicated, but it works in my mind.
He is referring to the selection of the actual target for a basic effect - target ability. You click the ability once, then you enter some sort of targeting mode, potentially displaying aoe and target indicators and allowing you to select the final target of the ability.
Unfortunately, this targeting mode is still somewhat unflexible, to my knowledge you cannot access it in any way other than pressing the button (or the respective hotkey). Also, once you entered that mode, you do not have access to any of the unit's other ability buttons until you either confirm the target, thus executing the ability, or cancel the targeting mode.
This results in your problem to be unsolvable with our current tools (again, only as far as I know). For hotkeys, you could maybe track them via trigger and execute the ability for a double-tapped hotkey, but that wouldn't allow double-tapping the button with the mouse, also you would need to check cooldowns manually etc...
The only 100% working option I can think of would be a workaround, something like simulating the targeting mode, possibly even the entire command card via trigger, so you can adjust it to your liking. This would have some issues of its own, for example dependency on mouse movement events which are not as responsive as the locally-executed targeting mode.
@silvermage: Go
i recorded video for you (fail with no-cursor, but i hope u understand what i mean)
i can re-record it with mouse cursor ofc
and all my problems well descibed by keuken531 above..
only working solution seems to be is enabling watch hotkeys trigger and then count key presses, which is bad
Update!
found UI - Player <Any Player> turns target mode <Any> for <Any Ability Command> event, yay it allows me to enable catch hotkey trigger, but i need to cancel target mode somehow, so main quesion is - how to exit target mode? :O
Button in command card Cancel Target requires requirment, but i dont know what kind of requirment it needs O-o