A persistant effect, which travels away from the caster, deals damage and sucks units hit into the center of the effect.
The damage shouldn't exceed a certain amount, but it would be great if it wouldn't be applied instantly either. The force effect should only pull a unit into the center once.
Since force effects are useless without a persistent that repeatedly activates them, I think the best way is to give the unit a behavior when it gets hit, which lasts for a short time - enough time to do the maximum amount of damage I want and to pull it to the center of the persistent effect - and then apply another behavior (via final effect) which makes the unit immune.
The question is though - how can I make a smoothly moving persistent effect? I think with small offsets (-Y) and small period durations it works, but that's still not very smooth, especially actor-wise.
Maybe create an invisible unit and attach the persistent effect to it? I am out of ideas.
I would probably launch a missile and execute the persistent effect on that missile. Would also provide an easy way to add a visual effect (give the missile the Vortex model for example).
I recommend using the Launch Effect field of a launch missile effect. If you execute a persistent with this field and set the persistents target to Source Unit, it will be executed on the projectile (to reference the casting unit, use Caster instead of Source).
And how can I make the missle move at the speed I want?
Also: I intended the ability to be castable at a range, and the effect should start at the target location and then move away from the caster. I am not sure you can do that with a missle.
And how can I make the missle move away from the caster? I am not sure it will move at all if I create it with a persistent effect, because it has no target.
You use a Local Offset on said persistent effect to mark the target direction. You might need a Set effect as a dummy somewhere, and I don't know if infinite range attacks are possible with Launch Missile effects.
One setup that definitely works is to make the ability apply a Set with target type Point containing the Persistent, give that 1 period with a local offset to paint the maximum range, and set the Periodic Effect to the missile launch with Launch Location+ set to "Set Effect - Target Point" and Impact Location+ set to "Persistent Effect - Target Point"
I don't remember which field on the Persistent controls the host for its local coordinates, but make sure you set that one to Caster Unit and use an ability with 0 casting arc to inherit the facing of the unit.
Launch Location: Persistent Effect - Target Point (this works)
Impact Location: Persistent Effect - Source Point (then the effect travels TOWARDS the caster, but at least this works nicely)
Now what I tried was a bit like what you suggest. I made the persistent effect create another persistent effect at (0,-5,0) (that's Y: -5,0 aka away from the caster) and set this new persistent effect as Impact Location, but this causes my missle to wander towards the bottom left corner of the map.
I thought it might be because it's the initial effect and the periodic effect happens after the initial so maybe the missle doesn't know where to go, because the missle is created before the persistent effect. But changing the missle to Final Effect gives the same result.
What you suggested didn't work, but a small change made it work:
Imapct Location -> Missle Effect - Target Point
No matter where you set the periodic offset the persistent effect will still be at the same location as the set - you need to use the periodic effect itself because that's the effect which is offset.
The targeting scope only works within one chain of effects, branches cannot interact.
Try Persistent->Set->Launch, using "Set - Source Point" as the launch location and "(Set -) Target Point" as the impact location. Or maybe it even works without the Set if you use "Launch Missile - Source Point" as the launch location.
Mover: I copied the Yamato Cannon (because that missle moves without any special stuff) and set minium and maximum movespeed to 2.0.
This works 100% like I intend it to.
What I am going to do now, is I will create a behavior which I put in the missle unit. This behavior will cast periodically a persistent effect (target = caster unit), which will cast a search effect initially which applies damage. So that everything around the missle will get damaged. Further I will add a periodic effect, with a very high count (20) and very short periodic durations (0.01) which casts an search effect with an apply force effect with amount = -1. This will drag all units into the missle after they got damaged (ingame it will look pretty much like it happened at the same time). At last I will add a final effect, which will also use a search effect and applies a behavior.
Then I will add validators to the damage and apply force effects which checks for the behavior so that units are immune to this ability after they got affected by the persistent effect once.
Any optimization? I don't like using markers because I don't understand them.
Assuming this is for a hero unit it might be better to apply the whole thing through the Launch Effect field on the launch missile effect, as that should automatically give the kill credit to the casting unit. Or run a KillsToCaster effect through this field.
I'm not sure your setup will work at all, I remember something about Apply Force effects requiring you to "lift" the units through a buff/Modify Unit effect first. Test if the Apply Force part works and if it doesn't post again, that will require reworking the setup so you apply a buff first.
Applying a buff through the Effect-Final field only works if the duration of the Persistent is shorter than the period of the main buff. Along with stacking problems with multiple casts of the same ability or possibly units teleporting into the AoE again. All avoided by using Markers.
For markers you just put the "No Markers" validator on the damage effect and tick Match Flags - Id in the Markers+ field somewhere. I don't know which is the best effect to set the Marker, but you can just go by trial and error. Use a damage effect that does between 50% and 100% max HP on your chosen target dummy to easily check if it's being applied more than once.
I did some optimizations myself though. It's better to run the damage and apply immunity effect as a set as an initial effect on the persistent, because otherwise units that get sucked into the effect sometimes get the final effect before the initial effect and then take no damage.
Of course this will make them immune to the force effect before it is applied, but that was no issue due to the fact that I wanted units to be sucked much longer into the ability than they take damage. So I gave the immunity behavior a periodic effect with 1 second period and only 1 period that applied ANOTHER immunity behavior, just for the apply force part. Now when they are hit, they are sucked into the ability, once they take damage (and they always do because the immunity and damage are on the same effect in the effect chain) they get immunity to the damage and after 1 second also immunity to the force effect. If they SOMEHOW manage to stay at the edge of the ability (the force effect search is bigger than the damage effect search) then they keep getting sucked into the ability until they take damage + 1 second. And all of this is working as I intended it to.
But you are right Photoloss! I need the kills to be granted to the unit casting this ability - because it needs to get experience from the kills. Otherwise this would of course not work as intended.
Now tell me - if I make the Launch Effect an "Apply Behavior"-Effect that applies the behavior which is casting the persistent effect on the missle - will it give the XP/Kills etc. to the casting unit or still to the missle?
If the "hero" is considered the Caster of the Launch Effect it should give kill credit. Or you can leave the whole effect chain on the missile and set the Launch Effect to apply the "Kills To Caster" buff (which already exists)
The solution with immunity buffs still sounds incredibly sloppy. I would only recommend it if there's no way two casts could occur on the same target within the immunity frame or the cast time could outlast the immunity (taking into account all possible team combinations, "cooldown reduction" effects and teleports which could transport a unit further down the AoE)
ID markers are constrained to one effect tree, and remain valid regardless of elapsed time (apart from some long-term memory issues I guess). I misunderstood your intentions, I thought the Apply Force part wasn't supposed to be limited. Try ticking the marker flag on the search effect(s), and putting all effects applied to the victim in one Set with the No Markers validator.
The setup should be MainBuff->Set(contains 2 searches A and B)
SearchA->Damage
SearchB->Set"F"(contains lift buff and force-spawning persistent)->...
In this case SearchA/B should have the Id Marker flag set and Damage and SetF should have the No Markers validator. Or if that doesn't work try setting the marker flag on Damage+SetF.
I might mess around with the markers, but don't worry, there can only be one unit of this type - and even if we consider having more of this at some point, this ability is too strong to effect the same unit multiple times in a short time window. (This is PvP, not PvE).
The kills to caster thing doesn't work. Probably because it's an behavior and I still found no way how to apply an behavior to the missle with the launch effect.
Be very careful, even the safety net League Of Legends has wouldn't be enough in some cases. In particular, if opposing teams are allowed to pick the same heroes you could still have two casts hitting a neutral monster at the same time, and you wouldn't want that to mess up if you have large "boss objective" monsters. The same goes if there's more than 2 teams without hero restrictions (Footmen)
You obviously need an Apply Behavior effect, I just wasn't sure whether the default one would work as it's aimed at the Target, which in this case might be the impact location.
Figure out which scope refers to which unit. The easiest way I know is to use the Kill and Suicide effects, and a custom kill effect set to Source Unit. Then you just have to watch which unit dies.
I would hope that Caster is the hero launching the missile, Source is the missile and Target is either also the missile or the impact destination. If this is true you should give kill credit to the Caster (stock KillsToCaster buff) and run the Apply Behavior effect on the Source Unit (you have to create this yourself)
If you're only using the periodic effect component of the buff applying the damage spawner through the Launch Effect field should also work if the hero is still considered the caster. KillsToCaster is normally used for autonomous minions or more complex logic, as weapons, damage auras, ability casts and damage responses on the minion won't give kill credit by default.
The behavior that is causing the persistent effect which deals damage and applies force etc. is on the missle unit by default, so it's not really part of the effect chain and I think that's the problem.
But I also don't quite get how to do what you said. I mean, should I just add this behavior to the missle? Or do I need to apply it to it via Launch Effect or something else?
Hah okay, it works:
Added the "KillsToCaster" buff as launch effect with target: source. I copied it nevertheless, because I dislike using stock stuff - I always copy everything.
Applying the buff you placed on the missile in the same way should also work in this case. The missile unit is part of the effect chain, anything intrinsically produced by it isn't.
Yeah it works fine now. Just need a good animation now. I use the vortex with green tint color and the smoke AoE effect together, looks quite okay, but it really THAT great.
Animations... when we are that. This hero will have an ability that causes strong winds in an aera, pushing units away from the caster location (ability working already) - any idea how I can make a nice wind-effect that - in the best case - also points into the direction units are pushed?
There aren't any good inwards-flowing effects afaik, BeingCrushed looks bad even for its intended use (implosion)
For the AoE push you should go through the various explosions and dust impact effects (Reaper jump etc.), remember you can always remove certain components via texture select. There are also a few missile models with trailing lines which you could attach to individual units, again hiding the missile body. Is this ability a one-shot blast or a continuous stream?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Okay, here is what I am trying to do:
Ability: Effect - Target Range: 5
A persistant effect, which travels away from the caster, deals damage and sucks units hit into the center of the effect.
The damage shouldn't exceed a certain amount, but it would be great if it wouldn't be applied instantly either. The force effect should only pull a unit into the center once.
Since force effects are useless without a persistent that repeatedly activates them, I think the best way is to give the unit a behavior when it gets hit, which lasts for a short time - enough time to do the maximum amount of damage I want and to pull it to the center of the persistent effect - and then apply another behavior (via final effect) which makes the unit immune.
The question is though - how can I make a smoothly moving persistent effect? I think with small offsets (-Y) and small period durations it works, but that's still not very smooth, especially actor-wise.
Maybe create an invisible unit and attach the persistent effect to it? I am out of ideas.
I would probably launch a missile and execute the persistent effect on that missile. Would also provide an easy way to add a visual effect (give the missile the Vortex model for example).
I recommend using the Launch Effect field of a launch missile effect. If you execute a persistent with this field and set the persistents target to Source Unit, it will be executed on the projectile (to reference the casting unit, use Caster instead of Source).
And how can I make the missle move at the speed I want?
Also: I intended the ability to be castable at a range, and the effect should start at the target location and then move away from the caster. I am not sure you can do that with a missle.
The missile speed is determined by its Mover.
You can spawn a Persistent effect at the target location and launch the missile from there.
And how can I make the missle move away from the caster? I am not sure it will move at all if I create it with a persistent effect, because it has no target.
You use a Local Offset on said persistent effect to mark the target direction. You might need a Set effect as a dummy somewhere, and I don't know if infinite range attacks are possible with Launch Missile effects.
One setup that definitely works is to make the ability apply a Set with target type Point containing the Persistent, give that 1 period with a local offset to paint the maximum range, and set the Periodic Effect to the missile launch with Launch Location+ set to "Set Effect - Target Point" and Impact Location+ set to "Persistent Effect - Target Point"
I don't remember which field on the Persistent controls the host for its local coordinates, but make sure you set that one to Caster Unit and use an ability with 0 casting arc to inherit the facing of the unit.
Okay, what I tried first was:
Ability -> Persistent Effect -> Initial Effect = Launch Missle.
Launch Location: Persistent Effect - Target Point (this works) Impact Location: Persistent Effect - Source Point (then the effect travels TOWARDS the caster, but at least this works nicely)
Now what I tried was a bit like what you suggest. I made the persistent effect create another persistent effect at (0,-5,0) (that's Y: -5,0 aka away from the caster) and set this new persistent effect as Impact Location, but this causes my missle to wander towards the bottom left corner of the map.
I thought it might be because it's the initial effect and the periodic effect happens after the initial so maybe the missle doesn't know where to go, because the missle is created before the persistent effect. But changing the missle to Final Effect gives the same result.
What you suggested didn't work, but a small change made it work:
Imapct Location -> Missle Effect - Target Point
No matter where you set the periodic offset the persistent effect will still be at the same location as the set - you need to use the periodic effect itself because that's the effect which is offset.
The targeting scope only works within one chain of effects, branches cannot interact.
Try Persistent->Set->Launch, using "Set - Source Point" as the launch location and "(Set -) Target Point" as the impact location. Or maybe it even works without the Set if you use "Launch Missile - Source Point" as the launch location.
Well, like I said, it works already.
What I did is: Ability -> "Persistent Effect" -> Periodic Effect ("Launch Missle") with Periodic Offset (0,-5,0); Period Count 1; Period Durations 0
Missle Effect: Launch Location: "Persistent Effect" - Target Point; Impact Location: "Launch Missle" - Target Point
Mover: I copied the Yamato Cannon (because that missle moves without any special stuff) and set minium and maximum movespeed to 2.0.
This works 100% like I intend it to.
What I am going to do now, is I will create a behavior which I put in the missle unit. This behavior will cast periodically a persistent effect (target = caster unit), which will cast a search effect initially which applies damage. So that everything around the missle will get damaged. Further I will add a periodic effect, with a very high count (20) and very short periodic durations (0.01) which casts an search effect with an apply force effect with amount = -1. This will drag all units into the missle after they got damaged (ingame it will look pretty much like it happened at the same time). At last I will add a final effect, which will also use a search effect and applies a behavior.
Then I will add validators to the damage and apply force effects which checks for the behavior so that units are immune to this ability after they got affected by the persistent effect once.
Any optimization? I don't like using markers because I don't understand them.
Assuming this is for a hero unit it might be better to apply the whole thing through the Launch Effect field on the launch missile effect, as that should automatically give the kill credit to the casting unit. Or run a KillsToCaster effect through this field.
I'm not sure your setup will work at all, I remember something about Apply Force effects requiring you to "lift" the units through a buff/Modify Unit effect first. Test if the Apply Force part works and if it doesn't post again, that will require reworking the setup so you apply a buff first.
Applying a buff through the Effect-Final field only works if the duration of the Persistent is shorter than the period of the main buff. Along with stacking problems with multiple casts of the same ability or possibly units teleporting into the AoE again. All avoided by using Markers.
For markers you just put the "No Markers" validator on the damage effect and tick Match Flags - Id in the Markers+ field somewhere. I don't know which is the best effect to set the Marker, but you can just go by trial and error. Use a damage effect that does between 50% and 100% max HP on your chosen target dummy to easily check if it's being applied more than once.
It works 100% like I posted it.
I did some optimizations myself though. It's better to run the damage and apply immunity effect as a set as an initial effect on the persistent, because otherwise units that get sucked into the effect sometimes get the final effect before the initial effect and then take no damage.
Of course this will make them immune to the force effect before it is applied, but that was no issue due to the fact that I wanted units to be sucked much longer into the ability than they take damage. So I gave the immunity behavior a periodic effect with 1 second period and only 1 period that applied ANOTHER immunity behavior, just for the apply force part. Now when they are hit, they are sucked into the ability, once they take damage (and they always do because the immunity and damage are on the same effect in the effect chain) they get immunity to the damage and after 1 second also immunity to the force effect. If they SOMEHOW manage to stay at the edge of the ability (the force effect search is bigger than the damage effect search) then they keep getting sucked into the ability until they take damage + 1 second. And all of this is working as I intended it to.
I didn't mention the height effects, but of course I lift the units before pulling them around (simply for the visual effect - this is a "whirlwind/cyclone/tornado" ability after all). That was no problem - if someone reads this and wonders how to do them -> http://www.sc2mapster.com/forums/resources/tutorials/9021-data-force-effects-intermediate-difficulty/
But you are right Photoloss! I need the kills to be granted to the unit casting this ability - because it needs to get experience from the kills. Otherwise this would of course not work as intended.
Now tell me - if I make the Launch Effect an "Apply Behavior"-Effect that applies the behavior which is casting the persistent effect on the missle - will it give the XP/Kills etc. to the casting unit or still to the missle?
If the "hero" is considered the Caster of the Launch Effect it should give kill credit. Or you can leave the whole effect chain on the missile and set the Launch Effect to apply the "Kills To Caster" buff (which already exists)
The solution with immunity buffs still sounds incredibly sloppy. I would only recommend it if there's no way two casts could occur on the same target within the immunity frame or the cast time could outlast the immunity (taking into account all possible team combinations, "cooldown reduction" effects and teleports which could transport a unit further down the AoE)
ID markers are constrained to one effect tree, and remain valid regardless of elapsed time (apart from some long-term memory issues I guess). I misunderstood your intentions, I thought the Apply Force part wasn't supposed to be limited. Try ticking the marker flag on the search effect(s), and putting all effects applied to the victim in one Set with the No Markers validator.
The setup should be MainBuff->Set(contains 2 searches A and B)
SearchA->Damage
SearchB->Set"F"(contains lift buff and force-spawning persistent)->...
In this case SearchA/B should have the Id Marker flag set and Damage and SetF should have the No Markers validator. Or if that doesn't work try setting the marker flag on Damage+SetF.
I might mess around with the markers, but don't worry, there can only be one unit of this type - and even if we consider having more of this at some point, this ability is too strong to effect the same unit multiple times in a short time window. (This is PvP, not PvE).
The kills to caster thing doesn't work. Probably because it's an behavior and I still found no way how to apply an behavior to the missle with the launch effect.
Be very careful, even the safety net League Of Legends has wouldn't be enough in some cases. In particular, if opposing teams are allowed to pick the same heroes you could still have two casts hitting a neutral monster at the same time, and you wouldn't want that to mess up if you have large "boss objective" monsters. The same goes if there's more than 2 teams without hero restrictions (Footmen)
You obviously need an Apply Behavior effect, I just wasn't sure whether the default one would work as it's aimed at the Target, which in this case might be the impact location.
Well the default one doesn't work.
And only one side can ever use this ability. It's not a mirror setup - one side has different units than the other.
My problem is to get the behavior on the missle and then also tell it who that caster actually is. It seems like I have trouble with the effect chain.
Figure out which scope refers to which unit. The easiest way I know is to use the Kill and Suicide effects, and a custom kill effect set to Source Unit. Then you just have to watch which unit dies.
I would hope that Caster is the hero launching the missile, Source is the missile and Target is either also the missile or the impact destination. If this is true you should give kill credit to the Caster (stock KillsToCaster buff) and run the Apply Behavior effect on the Source Unit (you have to create this yourself)
If you're only using the periodic effect component of the buff applying the damage spawner through the Launch Effect field should also work if the hero is still considered the caster. KillsToCaster is normally used for autonomous minions or more complex logic, as weapons, damage auras, ability casts and damage responses on the minion won't give kill credit by default.
The behavior that is causing the persistent effect which deals damage and applies force etc. is on the missle unit by default, so it's not really part of the effect chain and I think that's the problem.
But I also don't quite get how to do what you said. I mean, should I just add this behavior to the missle? Or do I need to apply it to it via Launch Effect or something else?
Hah okay, it works:
Added the "KillsToCaster" buff as launch effect with target: source. I copied it nevertheless, because I dislike using stock stuff - I always copy everything.
Applying the buff you placed on the missile in the same way should also work in this case. The missile unit is part of the effect chain, anything intrinsically produced by it isn't.
Yeah it works fine now. Just need a good animation now. I use the vortex with green tint color and the smoke AoE effect together, looks quite okay, but it really THAT great.
Animations... when we are that. This hero will have an ability that causes strong winds in an aera, pushing units away from the caster location (ability working already) - any idea how I can make a nice wind-effect that - in the best case - also points into the direction units are pushed?
There aren't any good inwards-flowing effects afaik, BeingCrushed looks bad even for its intended use (implosion)
For the AoE push you should go through the various explosions and dust impact effects (Reaper jump etc.), remember you can always remove certain components via texture select. There are also a few missile models with trailing lines which you could attach to individual units, again hiding the missile body. Is this ability a one-shot blast or a continuous stream?