Heya, I'm trying to figure out how to make an ability, but I can't even figure out where to start with this.
It'll be an ability that can place a unit. But I'd like it so that when you're in targeting mode, you can right-click and it changes what unit you're going to place, rather than cancels the ability.
Is there any way at all to achieve this? Maybe by having cancel somehow start targeting mode for another ability? Maybe by attaching the placement ghost to the mouse cursor and having a command-card submenu button that smart-activates on right click? I don't know if any of these things are possible, or how to do them if they are.
It really should avoid using triggers, because players will be using this constantly. Catching right-clicks with a trigger would mean that all players are constantly generating network traffic.
EDIT: I'm pretty sure this is physically impossible to do. But I think I have an idea for a workaround. I'll just have to use a submenu in the command card so that the player chooses to use that particular ability and then chooses which unit to place in the submenu.
I haven't tested it. I read that you can only have 4.
But I figure I can use requirements to show/hide buttons depending on what behaviors the casting unit has. A dummy ability can apply a behavior, and the requirements can kick in and show/hide buttons to simulate a fake submenu. I could even put in a dummy ability named "Cancel" and make it a smart command, so right-clicking could exit the fake submenu.
That's what I'm thinking anyway. Theoretically it should work. But I'll know for sure when I try it.
Heya, I'm trying to figure out how to make an ability, but I can't even figure out where to start with this.
It'll be an ability that can place a unit. But I'd like it so that when you're in targeting mode, you can right-click and it changes what unit you're going to place, rather than cancels the ability.
Is there any way at all to achieve this? Maybe by having cancel somehow start targeting mode for another ability? Maybe by attaching the placement ghost to the mouse cursor and having a command-card submenu button that smart-activates on right click? I don't know if any of these things are possible, or how to do them if they are.
It really should avoid using triggers, because players will be using this constantly. Catching right-clicks with a trigger would mean that all players are constantly generating network traffic.
EDIT: I'm pretty sure this is physically impossible to do. But I think I have an idea for a workaround. I'll just have to use a submenu in the command card so that the player chooses to use that particular ability and then chooses which unit to place in the submenu.
yes it's impossible, you cant even open a submenu for a player with triggers.
Oh damnit, you can only have four submenus too?
This is going to get tricky...
EDIT: Or I can just hide/show buttons as needed to simulate having submenus. That should be easy enough.
you can have more than 4 since HotS (?). it was limited at first to 4.
i once had the same issue and the only thing that comes near opening a submenu for a player is morphing the unit.
I haven't tested it. I read that you can only have 4.
But I figure I can use requirements to show/hide buttons depending on what behaviors the casting unit has. A dummy ability can apply a behavior, and the requirements can kick in and show/hide buttons to simulate a fake submenu. I could even put in a dummy ability named "Cancel" and make it a smart command, so right-clicking could exit the fake submenu.
That's what I'm thinking anyway. Theoretically it should work. But I'll know for sure when I try it.