I'm working on a set of abilities for a hero arena map I'm developing. One of the heroes has the ability to fire a tracer round, and then has the ability to fire off missiles that automatically home in to this target. Well, they should have that ability.
How it works now is that the Launch Missile effect requires a target, so the Ability has to be Effect - Target. It works fine, but it feels clunky to have to select the target you've already selected - and you can't do it at all if they're in fog of war, which is a big part of how I want him to work. I'd like to have the missile ability automatically select the target that has the Tracer Round behavior, but I don't know if it's possible.
Is there a way to establish a target inside of Effect - Instant, or any other workaround?
I don't understand very well your need, but what you're asking at the end can be made by a "create persistent" efect in a unit that cast each X miliseconds/seconds a "issue order" efect (the instant ability) where the original objective is.
I don't understand very well your need, but what you're asking at the end can be made by a "create persistent" efect in a unit that cast each X miliseconds/seconds a "issue order" efect (the instant ability) where the original objective is.
I'm not sure I understand your answer, so I'll explain my needs a bit better.
The unit has two abilities. The first targets a unit and applies a "tracer" behavior. The second fires a missile with a much longer range, but can only be shot at the unit with that specific behavior on it. As it works now, you have to target the missile fire by clicking the traced unit. I think it would feel much better if you could simply hit the hotkey for the missile ability, and it would automatically launch the missile at the unit with the behavior applied by the first. It's important that they are two separate abilities, because the tracer is an expensive ability with a long cool down, while the missiles are fairly cheap and spammable.
As far as I can tell, using an 'issue order' effect still requires the player to manually target the unit again, but maybe I'm not understanding what you mean.
(Only one unit at a time can have the tracer behavior applied, so there's no problem with multiple units confusing the system by both having the behavior)
Try this way. I don't know if it will work because of the validator, but you can give it a shot:
Create with the first ability ("effect - objective") a "set" effect that executes a "create persistent" effect in the objective instead of the behavior. The "create persistent" effect has to call each while a new "set" effect.
The second "set" effect has to have a validator that returns true if the unit that generated the first "set" efect has a behavior that you create. It must call the instant effect (i guess a launch missile effect) you want. If everything works fine, it will only be activated when the launcher has the behavior.
The second ability ("effect - instant") has to give to the launcher the behavior. The behavior used by the second "set" effect should last exactly the same time that the "create persistent" periods, or it may be launched twice (or even more times).
EDIT: I've realized that instead the second "set" effect, you can directly create the "launch missile" effect with the validator in it.
I would just use a Search Area effect. Have the first ability apply a buff that the launch missile effect of the second ability requires on the target.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I would just use a Search Area effect. Have the first ability apply a buff that the launch missile effect of the second ability requires on the target.
If that's right, I have my wires crossed somewhere, probably setting filling out the target/source fields on one of the effects.
Edit: This is the correct sequence for the chain, I had just neglected to revert to parent values when switching the ability type. Easy fix, and the ability works cleanly now. Thanks you two!
Sorry to revive this a bit, was wondering if anyone found a better solution to this
I want a targetting persistent effect, then have the other instant abilities call targets from that effect
For now It seems I cannot do this thing I require, I might be able to do it if I had a very elaborate switch effect on the persist effect itself, that would do my desired effect if the caster had a certain behavior on him, then have each ability be a "add behavior" that adds what I need it to, persist registers and removes it then carries on
Though this sounds clunky, and kind of strange considering they have options for effect targets in the effect itself.
I could probably do the search area solution but since I have multiple units using this, I think the targetting from the other units would mess it up would it not?
Maybe my answer is to have the "targetting" behavior cast a persist on creation?
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
I apologize for offering a very inelegant solution, but could you use triggers to meet your needs?
When the tracer hits a target, save that unit in a variable.
When you hit the hotkey for your firing missile ability (a transient, non-targeting ability), it creates a dummy effect (just a Set effect that does nothing). That effect can be picked up in the triggers and an Issue Order action can be given to the triggering effect unit caster to use an ability targeting the unit being stored as a variable from before. This ability would be a standard missile-launching ability.
Does that make sense?
Whenever I'm trying to create any sort of advanced ability or behavior I almost always find triggers to be the easiest and most flexible way to do it. Unfortunately it's a bit more laggy to mix data and triggers over just using data alone. Kind of a crutch, I guess.
Try use Set. First part is Search Area as Evil said, missile on impact apply dummy behaviour with duration 10secs. Second effect in Set of Caster apply behaviour on Caster with duration of few seconds(5-6 I guess) and release missiles with every period to targets with dummy behaviour validator.
Effect also can be with validator to prevent dummy cast.
This is how I would try if will be on your place.
The idea is to have 1 effect-target ability that applies a persistent, then have multiple other abilities that all fire to that target, I think the best way to do it is unfortunately triggers cause it seems you can't pass targets unless both effects using them are part of the same data stream, separate abilities just won't work.
Which is rather unfortunate, I was hoping to expand my knowledge of data a bit, shame.
In theory, it could however be done with a crazy switch effect, and have the persistent periodically cast said switch effect every .5 seconds after targeting the unit, the switch effect would register what behavior the caster had (also validating distances etc) then casting the required effect accordingly. (removing the behavior from the caster of course)
So the persistent created will set the target, and the other abilities will just give the caster different behaviors for the persist to register which ability it should be casting. In theory
However it would be much less time consuming to use triggers, and then the abilities could be dynamically set as well, soo, prolly going to do that. Whata shame
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
As drsuperevil said. All the mark ability needs to do is place a buff on the target. Then make the missile bail effect-instant, and its effect is a search area centered on the caster, with radius (rangeofmissiles), and a validator that requires the target to have a buff, and ass effect your launch missile effect. You don't even have to set max targets assuming that only 1 enemy will be marked at any time.
well that's the problem, multiple units in the map would all have that ability, and many of them multiple per player. If it just registered the buff, it would hit the targets other players mark as well, making your own marking counter-productive. I ended up making all the abilities work through weapons, and just have the "target unit" the unit's current attack target, so when casting an ability that requires target, apply buff to caster, buff = swap weapon
the validator idea would not only need to register the buff, it would need to know if the casting unit of the buff is the same unit casting this ability
I'm working on a set of abilities for a hero arena map I'm developing. One of the heroes has the ability to fire a tracer round, and then has the ability to fire off missiles that automatically home in to this target. Well, they should have that ability.
How it works now is that the Launch Missile effect requires a target, so the Ability has to be Effect - Target. It works fine, but it feels clunky to have to select the target you've already selected - and you can't do it at all if they're in fog of war, which is a big part of how I want him to work. I'd like to have the missile ability automatically select the target that has the Tracer Round behavior, but I don't know if it's possible.
Is there a way to establish a target inside of Effect - Instant, or any other workaround?
I don't understand very well your need, but what you're asking at the end can be made by a "create persistent" efect in a unit that cast each X miliseconds/seconds a "issue order" efect (the instant ability) where the original objective is.
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!
I'm not sure I understand your answer, so I'll explain my needs a bit better.
The unit has two abilities. The first targets a unit and applies a "tracer" behavior. The second fires a missile with a much longer range, but can only be shot at the unit with that specific behavior on it. As it works now, you have to target the missile fire by clicking the traced unit. I think it would feel much better if you could simply hit the hotkey for the missile ability, and it would automatically launch the missile at the unit with the behavior applied by the first. It's important that they are two separate abilities, because the tracer is an expensive ability with a long cool down, while the missiles are fairly cheap and spammable.
As far as I can tell, using an 'issue order' effect still requires the player to manually target the unit again, but maybe I'm not understanding what you mean.
(Only one unit at a time can have the tracer behavior applied, so there's no problem with multiple units confusing the system by both having the behavior)
Oh, I've definitively missunderstood you
Try this way. I don't know if it will work because of the validator, but you can give it a shot:
Create with the first ability ("effect - objective") a "set" effect that executes a "create persistent" effect in the objective instead of the behavior. The "create persistent" effect has to call each while a new "set" effect.
The second "set" effect has to have a validator that returns true if the unit that generated the first "set" efect has a behavior that you create. It must call the instant effect (i guess a launch missile effect) you want. If everything works fine, it will only be activated when the launcher has the behavior.
The second ability ("effect - instant") has to give to the launcher the behavior. The behavior used by the second "set" effect should last exactly the same time that the "create persistent" periods, or it may be launched twice (or even more times).
EDIT: I've realized that instead the second "set" effect, you can directly create the "launch missile" effect with the validator in it.
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!
I would just use a Search Area effect. Have the first ability apply a buff that the launch missile effect of the second ability requires on the target.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
The chain for this would be:
Ability (Effect-Instant) -> Effect (Create Persistent) -> Effect (Search Area) -> Effect (Launch Missile), correct?
If that's right, I have my wires crossed somewhere, probably setting filling out the target/source fields on one of the effects.
Edit: This is the correct sequence for the chain, I had just neglected to revert to parent values when switching the ability type. Easy fix, and the ability works cleanly now. Thanks you two!
Sorry to revive this a bit, was wondering if anyone found a better solution to this
I want a targetting persistent effect, then have the other instant abilities call targets from that effect
For now It seems I cannot do this thing I require, I might be able to do it if I had a very elaborate switch effect on the persist effect itself, that would do my desired effect if the caster had a certain behavior on him, then have each ability be a "add behavior" that adds what I need it to, persist registers and removes it then carries on
Though this sounds clunky, and kind of strange considering they have options for effect targets in the effect itself.
I could probably do the search area solution but since I have multiple units using this, I think the targetting from the other units would mess it up would it not?
Maybe my answer is to have the "targetting" behavior cast a persist on creation?
@EchoedRequiem: Go
I apologize for offering a very inelegant solution, but could you use triggers to meet your needs?
When the tracer hits a target, save that unit in a variable.
When you hit the hotkey for your firing missile ability (a transient, non-targeting ability), it creates a dummy effect (just a Set effect that does nothing). That effect can be picked up in the triggers and an Issue Order action can be given to the triggering effect unit caster to use an ability targeting the unit being stored as a variable from before. This ability would be a standard missile-launching ability.
Does that make sense?
Whenever I'm trying to create any sort of advanced ability or behavior I almost always find triggers to be the easiest and most flexible way to do it. Unfortunately it's a bit more laggy to mix data and triggers over just using data alone. Kind of a crutch, I guess.
Best of luck! rut
@rutegar: Go
Yes I could, but I'm looking for a data solution specifically
Try use Set. First part is Search Area as Evil said, missile on impact apply dummy behaviour with duration 10secs. Second effect in Set of Caster apply behaviour on Caster with duration of few seconds(5-6 I guess) and release missiles with every period to targets with dummy behaviour validator.
Effect also can be with validator to prevent dummy cast. This is how I would try if will be on your place.
The idea is to have 1 effect-target ability that applies a persistent, then have multiple other abilities that all fire to that target, I think the best way to do it is unfortunately triggers cause it seems you can't pass targets unless both effects using them are part of the same data stream, separate abilities just won't work.
Which is rather unfortunate, I was hoping to expand my knowledge of data a bit, shame.
In theory, it could however be done with a crazy switch effect, and have the persistent periodically cast said switch effect every .5 seconds after targeting the unit, the switch effect would register what behavior the caster had (also validating distances etc) then casting the required effect accordingly. (removing the behavior from the caster of course)
So the persistent created will set the target, and the other abilities will just give the caster different behaviors for the persist to register which ability it should be casting. In theory
However it would be much less time consuming to use triggers, and then the abilities could be dynamically set as well, soo, prolly going to do that. Whata shame
So why can you not just mark the target with a buff?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
As drsuperevil said. All the mark ability needs to do is place a buff on the target. Then make the missile bail effect-instant, and its effect is a search area centered on the caster, with radius (rangeofmissiles), and a validator that requires the target to have a buff, and ass effect your launch missile effect. You don't even have to set max targets assuming that only 1 enemy will be marked at any time.
well that's the problem, multiple units in the map would all have that ability, and many of them multiple per player. If it just registered the buff, it would hit the targets other players mark as well, making your own marking counter-productive. I ended up making all the abilities work through weapons, and just have the "target unit" the unit's current attack target, so when casting an ability that requires target, apply buff to caster, buff = swap weapon
the validator idea would not only need to register the buff, it would need to know if the casting unit of the buff is the same unit casting this ability