I want to make a chain lightning spell. To do this, I have an ability that casts a Set on the target enemy spot, which separates in Damage and a Search which picks one nearby enemy and repeat.
I also want a beam, of course. The first lightning bolt actor, a copy of the Archon Attack with as attack effect the first Damage, works great. The actor for the second bounce, however, which has as attack effect the second Damage, does not work correctly: the beam goes from the caster to the second target.
I tried changing pretty much everything and it keeps doing that. I want it to go from the first target (or the origin of the Search) to the second target, not from the caster to the second target.
@OP: I've been trying to figure out the same thing tonight, and can't seem to get it to properly launch the second/third/etc. beam from the proper locations
I got it working. Let me see if I can explain this.
The Archon's weapon has a "Set" effect. The first of the Set is Archon damage, which shoots a bolt as normal. The second effect is an "Apply Behavior" which goes on the targeted unit.
The behavior has a periodic effect that executes only once, on a .1 second timer (so there is a .1 second delay before the bolt bounces). The Periodic Effect does a "Search" effect, just like a mutalisk attack, and the Search effect again does the Archon damage effect (or another Set if you want to bounce it again). Since the damage effect originated from a behavior though, the bolt shoots out of the unit who possesses the behavior. Incredible, the Archon is still credited for the damage dealt by this bolt, since he is the one who applied the behavior. The behavior remembers it's parent =)
The only issue is that if bouncing more than once, it's probably possible for two targets to just bounce the bolt back and forth between each other. I may be able to use validators on the Search to ensure that doesn't happen (by ignoring any targets that already have the behavior i.e. recently received a bolt) but it could cause issues if multiple units tried to apply the effect at once. There may be a way to create perfect bouncing behavior via triggers, but that's a project for another day.
I had some fun with this, such as changing the behavior to shoot out TEN bolts, spaced .1 second apart. Basically, the archon "charges" the probe and it starts zapping all of the probes nearby ;-) You can do a lot of fun stuff with behaviors and effects.
Wow o_o Nice work! :)
So the missing link was the behaviour.
I think it is possible to make the bolt not bounce back by copying the mutalisk validators, but this may lead to 'NextDelay' issues. What you could try is make the first behaviour last 0.2 seconds, then the second one 0.1 second and search for targets that don't still have the behaviour.
But then in League of Legends the various chain effects didn't account for this either and it made them more interesting to play with and against.
I'm not really sure, the Mutalisk's Search effect doesn't have anything special going on. The Search Filters are typical (it can't hit dead or hidden units, it only hits enemies, etc) and the Search excludes "Target" and "Outer." Excluding target means the search won't select the unit that was targeted by the search (so the missile won't just hit the same unit three times without going anywhere) and I have no idea what Outer means, but perhaps it was the key!
Come to think of it, when I did my "one bolt into ten" thing playing around, I don't think the same unit ever got struck by a bolt more than once. I would hit a probe and he would shoot lightning bolts to up to ten DIFFERENT targets in range, sometimes shooting less than ten bolts altogether, so it looks like "Exclude Outer|Target" works. I just wish I knew how and why.
Quote from MasterDinadan:
I'm not really sure, the Mutalisk's Search effect doesn't have anything special going on. The Search Filters are typical (it can't hit dead or hidden units, it only hits enemies, etc) and the Search excludes "Target" and "Outer." Excluding target means the search won't select the unit that was targeted by the search (so the missile won't just hit the same unit three times without going anywhere) and I have no idea what Outer means, but perhaps it was the key!
Come to think of it, when I did my "one bolt into ten" thing playing around, I don't think the same unit ever got struck by a bolt more than once. I would hit a probe and he would shoot lightning bolts to up to ten DIFFERENT targets in range, sometimes shooting less than ten bolts altogether, so it looks like "Exclude Outer|Target" works. I just wish I knew how and why.
----
that's how muta's attack works, does not bounce to the same target
I'm putting together a better demonstration, but I've run into a problem. Even using the Mutalisk's Search effect, the bolt can bounce back and forth between two units. It seems that while the Mutalisk's chain of events can remember all of the targets it has effected, the fact that my chain of events is punctuated by behaviors causes it to lose it's target list and return to a unit that has previously been targeted.
My current bolt bounces three times and this is how it works:
My unit has a targeted ability. The ability effect is "Set1."
Set1 is a Set which does two abilities, "Archon Damage" (which shoots a bolt and does damage) and "Buff1" which applies the behavior "Charged1"
The charged1 behavior is a buff with a single periodic effect at .1 seconds. The periodic effect is "Search1"
The Search1 effect finds a target and applies the "Set2" effect. Set2 does Archon Damage and then does "Buff2" which applies "Charged2" and Charged2 does "Search2" which finds another target and just applies the Archon Damage effect.
The problem is, typically the bolt will hit my target, bounce some place else, and then bounce back to the first
target. I made the duration of Charged1 longer than the ability (even making it permanent) and created a validator that checks unit behavior, but it doesn't seem to work at all. Something must be wrong with my validator, because if I put any other validator that will return false, such as "Is Hatchery," the bolt does not bounce, as I would expect. (I'm testing it on Zerglings just so we're clear).
If I get the validator working, it will probably be fine, but I can't figure that part out.
Edit - I figured out the problem. The validator is a condition for the Search function as a whole, it's not a filter for the search. It checks the unit which is performing the search which actually means that the bolt will stop if it hits a unit that has charged1, not that it will be unable to bounce to such a unit.
A nit: instead of damage and then the behaviour effect, you need to put first the behaviour effect and then the damage in the set. Otherwise if the damage kills the enemy, the behaviour is not applied.
Oh can you upload that example please?
I've been trying to recreate what MasterDinadan have explained, but I can't seem to make it bounce, so I'm hoping for an example ^_^
Does yours always bounce to a third target? I still can't get mine to work right, as it occasionally bounces back to the first target. Your implementation looks way better than mine anyway so I'd like to see it ;-)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
I want to make a chain lightning spell. To do this, I have an ability that casts a Set on the target enemy spot, which separates in Damage and a Search which picks one nearby enemy and repeat.
I also want a beam, of course. The first lightning bolt actor, a copy of the Archon Attack with as attack effect the first Damage, works great. The actor for the second bounce, however, which has as attack effect the second Damage, does not work correctly: the beam goes from the caster to the second target.
I tried changing pretty much everything and it keeps doing that. I want it to go from the first target (or the origin of the Search) to the second target, not from the caster to the second target.
Halp!1! :(
@BrotherLaz: Go
:( I wish I knew how to help you. I wish they had many more templates of spells from wc3.
Maybe you could make it so It only does slight damage on the first bounce, and massive damage on the second bounce.
*cough* Mutalisk *cough*
What, a Median version of StarCraft II? ;) Or rather, a StarCraft II version of Median!
Oooh does the mutalisks attack hit the first/original target after bouncing the 2nd time?
missiles =/= beams
@OP: I've been trying to figure out the same thing tonight, and can't seem to get it to properly launch the second/third/etc. beam from the proper locations
I got it working. Let me see if I can explain this.
The Archon's weapon has a "Set" effect. The first of the Set is Archon damage, which shoots a bolt as normal. The second effect is an "Apply Behavior" which goes on the targeted unit. The behavior has a periodic effect that executes only once, on a .1 second timer (so there is a .1 second delay before the bolt bounces). The Periodic Effect does a "Search" effect, just like a mutalisk attack, and the Search effect again does the Archon damage effect (or another Set if you want to bounce it again). Since the damage effect originated from a behavior though, the bolt shoots out of the unit who possesses the behavior. Incredible, the Archon is still credited for the damage dealt by this bolt, since he is the one who applied the behavior. The behavior remembers it's parent =)
The only issue is that if bouncing more than once, it's probably possible for two targets to just bounce the bolt back and forth between each other. I may be able to use validators on the Search to ensure that doesn't happen (by ignoring any targets that already have the behavior i.e. recently received a bolt) but it could cause issues if multiple units tried to apply the effect at once. There may be a way to create perfect bouncing behavior via triggers, but that's a project for another day.
For now, my archon will enjoy blowing up probes two at a time: http://i10.photobucket.com/albums/a109/MasterDinadan/bolts-1.jpg
I had some fun with this, such as changing the behavior to shoot out TEN bolts, spaced .1 second apart. Basically, the archon "charges" the probe and it starts zapping all of the probes nearby ;-) You can do a lot of fun stuff with behaviors and effects.
Wow o_o Nice work! :) So the missing link was the behaviour.
I think it is possible to make the bolt not bounce back by copying the mutalisk validators, but this may lead to 'NextDelay' issues. What you could try is make the first behaviour last 0.2 seconds, then the second one 0.1 second and search for targets that don't still have the behaviour.
But then in League of Legends the various chain effects didn't account for this either and it made them more interesting to play with and against.
Thanks!
I'm not really sure, the Mutalisk's Search effect doesn't have anything special going on. The Search Filters are typical (it can't hit dead or hidden units, it only hits enemies, etc) and the Search excludes "Target" and "Outer." Excluding target means the search won't select the unit that was targeted by the search (so the missile won't just hit the same unit three times without going anywhere) and I have no idea what Outer means, but perhaps it was the key!
Come to think of it, when I did my "one bolt into ten" thing playing around, I don't think the same unit ever got struck by a bolt more than once. I would hit a probe and he would shoot lightning bolts to up to ten DIFFERENT targets in range, sometimes shooting less than ten bolts altogether, so it looks like "Exclude Outer|Target" works. I just wish I knew how and why.
Quote from MasterDinadan:
I'm not really sure, the Mutalisk's Search effect doesn't have anything special going on. The Search Filters are typical (it can't hit dead or hidden units, it only hits enemies, etc) and the Search excludes "Target" and "Outer." Excluding target means the search won't select the unit that was targeted by the search (so the missile won't just hit the same unit three times without going anywhere) and I have no idea what Outer means, but perhaps it was the key!
Come to think of it, when I did my "one bolt into ten" thing playing around, I don't think the same unit ever got struck by a bolt more than once. I would hit a probe and he would shoot lightning bolts to up to ten DIFFERENT targets in range, sometimes shooting less than ten bolts altogether, so it looks like "Exclude Outer|Target" works. I just wish I knew how and why.
----
that's how muta's attack works, does not bounce to the same target
MasterDinadan, do you think you could be so kind to upload your working version?
Would appreciate it a lot.
@Heu: Go
I didn't save it, but I'll whip something up quick later tonight and try to make it a bit more presentable.
Sounds great thanks :)
It works brilliantly! :D
Could you explain more throuly how you did the chain lightning? :)
I'm putting together a better demonstration, but I've run into a problem. Even using the Mutalisk's Search effect, the bolt can bounce back and forth between two units. It seems that while the Mutalisk's chain of events can remember all of the targets it has effected, the fact that my chain of events is punctuated by behaviors causes it to lose it's target list and return to a unit that has previously been targeted.
My current bolt bounces three times and this is how it works:
My unit has a targeted ability. The ability effect is "Set1." Set1 is a Set which does two abilities, "Archon Damage" (which shoots a bolt and does damage) and "Buff1" which applies the behavior "Charged1"
The charged1 behavior is a buff with a single periodic effect at .1 seconds. The periodic effect is "Search1"
The Search1 effect finds a target and applies the "Set2" effect. Set2 does Archon Damage and then does "Buff2" which applies "Charged2" and Charged2 does "Search2" which finds another target and just applies the Archon Damage effect.
The problem is, typically the bolt will hit my target, bounce some place else, and then bounce back to the first target. I made the duration of Charged1 longer than the ability (even making it permanent) and created a validator that checks unit behavior, but it doesn't seem to work at all. Something must be wrong with my validator, because if I put any other validator that will return false, such as "Is Hatchery," the bolt does not bounce, as I would expect. (I'm testing it on Zerglings just so we're clear).
If I get the validator working, it will probably be fine, but I can't figure that part out.
Edit - I figured out the problem. The validator is a condition for the Search function as a whole, it's not a filter for the search. It checks the unit which is performing the search which actually means that the bolt will stop if it hits a unit that has charged1, not that it will be unable to bounce to such a unit.
A nit: instead of damage and then the behaviour effect, you need to put first the behaviour effect and then the damage in the set. Otherwise if the damage kills the enemy, the behaviour is not applied.
Chain Lightning
Oh can you upload that example please?
I've been trying to recreate what MasterDinadan have explained, but I can't seem to make it bounce, so I'm hoping for an example ^_^
@BrotherLaz: Go
Does yours always bounce to a third target? I still can't get mine to work right, as it occasionally bounces back to the first target. Your implementation looks way better than mine anyway so I'd like to see it ;-)