Hey everyone, i'm looking to create an ability which the user acquires multiple targets. As an example i would like to make the ghost snipe ability only start after the player has chosen 3 targets. Then the ghost snipes the 3 targets with a small delay in between each shot. Any ideas for how to make this possible would be fantastic =D
Actually, it is possible to do through the data editor. Although it's a bit complex.
What you need to do is create two different buffs, one which is something like:
"Marked", and another which would be something like "Targets". Both should probably be hidden. Now this is what you want to do:
Your snipe ability should do a set of items:
-Apply a buff to the target "Marked"
-Apply a buff to you "Targets". This should be stackable up to 3 times.
-Do a search effect for units with the "Marked" buff IF you have 3 stacks of "Targets" (Use validators)
-Remove your "Targets" buffs IF you have 3 stacks of "Targets"
The search effect should then do another set of effects:
-Remove the "Marked" effect from the unit
-Do the damage/effect you want on the snipe ability
You might have to make some other adjustments too, like a timer on the behaviors etc. Also this would be problematic if there is more than one sniper, you'd have to create some more validators for that.
If you want to do it with the trigger editor, that's possible too. Although if you don't know how to code it'll be hard. What you need to do is create an unit array for the sniper, and then create an event for when you use the sniper ability. Add the target to the array, check if there are 3 units there, and if there is, do your magic on them.
Both solutions do not adress the problem on how to actually pick the targets, do they? In both cases, the actual ability needs to be casted multiple times and cannot go click button -> select target 1 -> select target 2 ->..., correct?
I did not find a solution for this now.
@Roar_Man: Go How would i go about doing this with a trigger??
I have a basic idea for this.
Basically what you'd want is to have a dummy spell that's cast 3 times to pick up targets and a real spell that will be cast 3 times to the targets previously selected.
Make a trigger that detects when the Unit casts the spell, and then have the trigger push the "Command Card" for player. This why it seems like you're casting one spell multiple times when really you're casting the same spell multiple times.
Have the trigger also add units you target to a unit group so you can have your Ghost cast his real spell on them.
In my solution it would solve the problem you mention here. Each time you cast the spell it applies a buff, then when there are 3 buffs out, the snipe goes off. You would go "use ability on target 1","use ability on target 2","use ability on target 3", *snipe goes off on all 3 targets*
In my solution it would solve the problem you mention here. Each time you cast the spell it applies a buff, then when there are 3 buffs out, the snipe goes off. You would go "use ability on target 1","use ability on target 2","use ability on target 3", *snipe goes off on all 3 targets*
This does not solve the problem I speak of, since you would still need to cast the spell 3 times. (clicks: button -> enemy -> button -> enemy -> button -> enemy instead of button -> enemy -> enemy -> enemy).
Basically what you'd want is to have a dummy spell that's cast 3 times to pick up targets and a real spell that will be cast 3 times to the targets previously selected.
Make a trigger that detects when the Unit casts the spell, and then have the trigger push the "Command Card" for player. This why it seems like you're casting one spell multiple times when really you're casting the same spell multiple times.
Have the trigger also add units you target to a unit group so you can have your Ghost cast his real spell on them.
Dirty workaround, will most likely not work that well (are there even functions to push command card buttons? If there are, I am sure they suffer from a huge delay in multiplayer)
Ooooh, yeah, then I misunderstood. I really don't think there's a way to do that just through the data editor, no. Well... unless you just tell them to hold the freaking shift key down :P.
Still possible using triggers, although a little messy. Just create a dummy ability, with lots of code behind it.
Edit: Btw, there's no trigger for pressing a command card, but it's possible to create an ability which links to an effect that does nothing. Then you can run a trigger for that.
Im not too sure about how augment abilities work, but from what i saw they cause an effect AND issue an order.
So, create 4 abilities, 3 are augments and one is effect instant. Create an apply behavior effect and a behavior for it. Add those apply behavior effects to the augment abilities. Give each augment ability a command button (you have to be able to see the difference between the abilities somehow though). Then go on the order that is issued with the ability, and pick the next augment in line. The last augment issues the effect-instant ability. Create a search effect for the last ability, use a validator to check whether the behavior is already on the search targets, and have your snipe damage effect as the effect.
Add all four abilities to your unit, add four buttons one over the other, the one on top should be the only with a hotkey and the start the first augment, while the other below are for the other 3 abilities.
Not sure whether augments can pick targets though :( I worked with them way back in beta, didnt really understand them and just gave up on them and only remembered them now. If anyone else knows a better way on how to issue orders to a single unit, use that way to chain the four abilities.
Your snipe ability checks the Ghost, first. If ghost does not have 3stacked Behavior X(stackable), then add +1 Behavior X to Ghost, place Behavior Y(non stackable) on target. Ghost can fire and deal damage if Behavior X is stacked 3 times on him. Search Area/Damage is dealt by Validating Behavior Y on target, so it doesn't just target 3 random targets. If Target with Behavior Y dies before the snipes go off, well too bad :P
These are some pretty nifty ideas which i will have to play around with, sorry i havent had a chance to get back to you all earlier i have been quite the busy with school. I thought i could use an ability which called other abilities and when the final target was picked the real ability would fire.
Thank you all for your help it gave some great insights into creating this ability. =D
I tried around with this, and it seems quite impossible. There seems to be no way to send a new ability command to the cursor. You can issue multiple abilities easily, but you have to select the targets in the effects or trigger. Always. For every trigger or data solution you cannot pick a target with the mouse, except for the first cast. There is no such thing as a "press command card" trigger action or data effect; not even force UI key. I tried other stuff (rally, augment, even merge) but was not able to find a solution.
€ this is the best I got so far:
As you can see you still have to cast an ability 3 times, but at least it is the same ability, so you can shift-queue it. If a target gets out of range or dies prematurely, the ability targets random other targets. It is not entirely mui, 2 casters might target each other's picked targets.
I used triggers for the facing of the caster (did not find a working data method for that) and for the cooldown (same here. Cooldown needs to be zero for the targeting casts, but >0 for the actual ability after the cast)
Note that the final implementation is probably not the best/most efficient. It was the first thing I got working, so parts of my other approaches might still be present.
Hey everyone, i'm looking to create an ability which the user acquires multiple targets. As an example i would like to make the ghost snipe ability only start after the player has chosen 3 targets. Then the ghost snipes the 3 targets with a small delay in between each shot. Any ideas for how to make this possible would be fantastic =D
I don't think this is possible through Data, it could be done through triggers though.
@Roar_Man: Go How would i go about doing this with a trigger??
Actually, it is possible to do through the data editor. Although it's a bit complex.
What you need to do is create two different buffs, one which is something like: "Marked", and another which would be something like "Targets". Both should probably be hidden. Now this is what you want to do:
Your snipe ability should do a set of items: -Apply a buff to the target "Marked" -Apply a buff to you "Targets". This should be stackable up to 3 times. -Do a search effect for units with the "Marked" buff IF you have 3 stacks of "Targets" (Use validators) -Remove your "Targets" buffs IF you have 3 stacks of "Targets"
The search effect should then do another set of effects: -Remove the "Marked" effect from the unit -Do the damage/effect you want on the snipe ability
You might have to make some other adjustments too, like a timer on the behaviors etc. Also this would be problematic if there is more than one sniper, you'd have to create some more validators for that.
If you want to do it with the trigger editor, that's possible too. Although if you don't know how to code it'll be hard. What you need to do is create an unit array for the sniper, and then create an event for when you use the sniper ability. Add the target to the array, check if there are 3 units there, and if there is, do your magic on them.
Both solutions do not adress the problem on how to actually pick the targets, do they? In both cases, the actual ability needs to be casted multiple times and cannot go click button -> select target 1 -> select target 2 ->..., correct? I did not find a solution for this now.
I have a basic idea for this.
Basically what you'd want is to have a dummy spell that's cast 3 times to pick up targets and a real spell that will be cast 3 times to the targets previously selected.
Make a trigger that detects when the Unit casts the spell, and then have the trigger push the "Command Card" for player. This why it seems like you're casting one spell multiple times when really you're casting the same spell multiple times.
Have the trigger also add units you target to a unit group so you can have your Ghost cast his real spell on them.
@Kueken531: Go
In my solution it would solve the problem you mention here. Each time you cast the spell it applies a buff, then when there are 3 buffs out, the snipe goes off. You would go "use ability on target 1","use ability on target 2","use ability on target 3", *snipe goes off on all 3 targets*
This does not solve the problem I speak of, since you would still need to cast the spell 3 times. (clicks: button -> enemy -> button -> enemy -> button -> enemy instead of button -> enemy -> enemy -> enemy).
Dirty workaround, will most likely not work that well (are there even functions to push command card buttons? If there are, I am sure they suffer from a huge delay in multiplayer)
@Kueken531: Go
Ooooh, yeah, then I misunderstood. I really don't think there's a way to do that just through the data editor, no. Well... unless you just tell them to hold the freaking shift key down :P.
Still possible using triggers, although a little messy. Just create a dummy ability, with lots of code behind it.
Edit: Btw, there's no trigger for pressing a command card, but it's possible to create an ability which links to an effect that does nothing. Then you can run a trigger for that.
Im not too sure about how augment abilities work, but from what i saw they cause an effect AND issue an order.
So, create 4 abilities, 3 are augments and one is effect instant. Create an apply behavior effect and a behavior for it. Add those apply behavior effects to the augment abilities. Give each augment ability a command button (you have to be able to see the difference between the abilities somehow though). Then go on the order that is issued with the ability, and pick the next augment in line. The last augment issues the effect-instant ability. Create a search effect for the last ability, use a validator to check whether the behavior is already on the search targets, and have your snipe damage effect as the effect.
Add all four abilities to your unit, add four buttons one over the other, the one on top should be the only with a hotkey and the start the first augment, while the other below are for the other 3 abilities.
Not sure whether augments can pick targets though :( I worked with them way back in beta, didnt really understand them and just gave up on them and only remembered them now. If anyone else knows a better way on how to issue orders to a single unit, use that way to chain the four abilities.
@TheAlmaity: Go
I just got an idea.
Your snipe ability checks the Ghost, first. If ghost does not have 3stacked Behavior X(stackable), then add +1 Behavior X to Ghost, place Behavior Y(non stackable) on target. Ghost can fire and deal damage if Behavior X is stacked 3 times on him. Search Area/Damage is dealt by Validating Behavior Y on target, so it doesn't just target 3 random targets. If Target with Behavior Y dies before the snipes go off, well too bad :P
Sound feasible?
These are some pretty nifty ideas which i will have to play around with, sorry i havent had a chance to get back to you all earlier i have been quite the busy with school. I thought i could use an ability which called other abilities and when the final target was picked the real ability would fire.
Thank you all for your help it gave some great insights into creating this ability. =D
I tried around with this, and it seems quite impossible. There seems to be no way to send a new ability command to the cursor. You can issue multiple abilities easily, but you have to select the targets in the effects or trigger. Always. For every trigger or data solution you cannot pick a target with the mouse, except for the first cast. There is no such thing as a "press command card" trigger action or data effect; not even force UI key. I tried other stuff (rally, augment, even merge) but was not able to find a solution.
€ this is the best I got so far:
As you can see you still have to cast an ability 3 times, but at least it is the same ability, so you can shift-queue it. If a target gets out of range or dies prematurely, the ability targets random other targets. It is not entirely mui, 2 casters might target each other's picked targets.
I used triggers for the facing of the caster (did not find a working data method for that) and for the cooldown (same here. Cooldown needs to be zero for the targeting casts, but >0 for the actual ability after the cast)
Note that the final implementation is probably not the best/most efficient. It was the first thing I got working, so parts of my other approaches might still be present.