If you are looking for an beginner level tutorial, start with my Beams Tutorial
What separates this tutorial from other bounce attack tutorials? We WON'T be using missiles. Period. I've read the tutorials, seen the videos and frankly I'm not impressed with missile based chain lightning. It's a messy and restrictive way of connecting the dots. Before we begin, take a look at this picture:
This is a custom Structure with a custom model that shoots a beam bouncing 3 times and finishing with an AoE splash. This means we'll need to make the following:
1 Unit
2 Unit Actors
1 Unit Model
1 Turret
1 Turret Actor
1 Weapon
3 Behavior Buffs
3 Validators
3 Target Sorts
15 Effects
2 Beam Actors
2 Beam Attack Actors
2 Beam Models
1 AoE Actor
1 AoE Sound Actor
1 AoE Model
It seems like a lot, but that's because we're adding extra parts. We'll be using the Previewer (Ctrl + Shift + V) to select models and effect animations that aren't currently in use, so let's start there:
We want to make our Beam-chain as cool as possible, so let's start by going to Assets > Doodads. Scroll down to Temple Column > TempleColumn_17.m3. Double click it and check out this awesome doodad that will soon be our tower of death. It is important to note that it doesn't have any attachments, so we will be restricted on where the lightning originates: the ground. However, we can create a workaround by applying a Site Operator to the beam's actor causing it to shoot from a height above the ground. If this bothers you, choose a structure model with attachment points. Now that we have our desired model, let's pick out some effects. I decided to use MothershipPhotonBeam.m3 as the first attack, NullifierBeam.m3 as the 3 bounce attacks and DetonateImpact.m3 as the final AoE. Keep track of the models you chose unless you're going to follow along with me. Close the Previewer and open the Data Editor (F7). From here on out I'm going to short hand as much as possible.
I could fill several pages with heavy details, but for the sake of brevity I'm going to expect you to have intermediate knowledge of the Data Editor. If you DON'T, you should probably start with other tutorials before reading this.
Models tab
New model named Beam Tower
set model to TempleColumn_17.m3
New model named Beam 1
set model to MothershipPhotonBeam.m3
New model named Beam 2
set model to NullifierBeam.m3
New model named AoE Splash
set model to DetonateImpact.m3
You may be tempted to mess with sizes and so for, but don't. This is your generic model. We will use actors to change anything and everything we want. This prevents redundancies.
Effects tab
New effect named Beam Bounce 4 (Splash Damage) with Effect Type: Damage
set Amount: 40
set Death: Blast
set Kind: Splash
set Area +: Arc: 360, Fraction: 1, Maximum Count: -1 and Radius: 1.5
set Exclude +: Target
set Search Filters: [Dead/Hidden/Invulnerable/Missile/Resource(both)/Self/Stasis] exclude and [Visible] required uncheck ally and player
set Launch Location +: Target Unit
New effect named Beam Bounce 1 (Damage) with Effect Type: Damage
set Amount: 60 > set Death: Electrocute
set Kind: Ranged
Duplicate above effect and name Beam Bounce 2 (Damage) with Amount 50
Duplicate above effect and name Beam Bounce 3 (Damage) with Amount 40
Duplicate above effect and name Beam Bounce 4 (Damage) with Amount 30
New effect named Beam Bounce 1 (Search) with Effect Type: Search Area
Duplicate above effect and name Beam Bounce 2 (Search)
Duplicate above effect and name Beam Bounce 3 (Search)
We'll come back to these effects after creating other parts of the chain
Behaviors tab
New behavior named Bounce 1 Buff with Behavior Type: Buff
set Effect - Initial: Beam Bounce 1 (Search)
set Duration: 0.5
set Flags: Hidden
Duplicate above behavior and name Bounce 2 Buff with Effect - Initial: Beam Bounce 2 (Search)
Duplicate above behavior and name Bounce 3 Buff with Effect - Periodic: Beam Bounce 3 (Search) and Stats - Duration: 0.1
For whatever reason, the last buff in your chain must apply it's effect at the end of its period or it won't register at all. It doesn't change a whole lot mechanic wise other than that you have to remember this or you'll find yourself 1 beam short. In our case it would mean no AoE splash either and we certain don't want to lose our big explosion!
Now you might be confused as to why we're making behaviors and why our behaviors are search for targets. The simple explanation is that applying buffs to a target allows you to change the buffed unit to the origin of any effects it activates. This is how you "chain" attacks. Without buffs, all of your beams would shoot from your unit/structure despite the damage being chained. You could argue this is exactly the same as missiles, but there is a one major difference: buffs allow you to directly apply behaviors while continuing the chain. With missiles you would need behaviors AND missiles in order to achieve the same thing. The best example would be an implementation of WC3's healing wave. Using buffs, your effect sequence would be:
The best part is you can even use Search Target Sorts to pick units with the lowest health % first. Your buff could even add a HoT to boot! Now imagine using missiles to achieve the same thing. . . . nightmare!
Validators tab
New validator named Beam Buff 1 with Validator Type: Unit Compare Behavior Count
set Behavior: Bounce 1 Buff
set Compare: Not Equal To
set Value: 1
Duplicate above validator and name Beam Buff 2 with Behavior: Bounce 2 Buff*
Duplicate above validator and name Beam Buff 3 with Behavior: Bounce 3 Buff*
These will prevent your buffs from stacking.
Effects tab
New effect named Beam Bounce 1 (Buff) with Effect Type: Apply Behavior
set Behavior: Bounce 1 Buff
set Validators: Beam Buff 1
Duplicate above effect and name Beam Bounce 2 (Buff) with Behavior: Bounce 2 Buff and Validators: Beam Buff 2
Duplicate above effect and name Beam Bounce 3 (Buff) with Behavior: Bounce 3 Buff and Validators: Beam Buff 3
Now let's link everything together
New effect named Beam Bounce 1 (Set) with Effect Type: Set
set Effects: Beam Bounce 1 (Buff) and Beam Bounce 1 (Damage)
set Maximum Count: -1
Duplicate above effect and name Beam Bounce 2 (Set) with Effects: Beam Bounce 2 (Buff) and Beam Bounce 2 (Damage)
Duplicate above effect and name Beam Bounce 3 (Set) with Effects: Beam Bounce 3 (Buff) and Beam Bounce 3 (Damage)
Duplicate above effect and name Beam Bounce 4 (Set) with Effects: Beam Bounce 4 (Damage) and Beam Bounce 4 (Splash Damage)
Target Sorts tab
New target sort named NotHitByBeam1 with Target Sort Type: Behavior Count
set Behavior: Bounce 1 Buff
set Unit+: Target
set Value: 1
Duplicate above target sort and name NotHitByBeam2 with Behavior: Bounce 2 Buff
Duplicate above target sort and name NotHitByBeam3 with Behavior: Bounce 3 Buff
These will prevent your search effects from picking units hit earlier in the chain.
Effects tab
Return to Beam Bounce 1 (Search)
set Area +: Arc: 360, Effect: Beam Bounce 2 (Set), Maximum Count: 1 and Radius: 6
set Exclude +: Target
set Search Filters: [Dead/Hidden/Invulnerable/Missile/Resource(both)/Self/Stasis] exclude and [Visible] required uncheck ally and player
set Target Sorts +: NotHitByBeam1
Return to Beam Bounce 2 (Search)
set Area +: Arc: 360, Effect: Beam Bounce 3 (Set), Maximum Count: 1 and Radius: 6
set Exclude +: Target
set Search Filters: [Dead/Hidden/Invulnerable/Missile/Resource(both)/Self/Stasis] exclude and [Visible] required uncheck ally and player
set Target Sorts +: NotHitByBeam1 and NotHitByBeam2
Return to Beam Bounce 3 (Search)
set Area +: Arc: 360, Effect: Beam Bounce 4 (Set), Maximum Count: 1 and Radius: 6
set Exclude +: Target
set Search Filters: [Dead/Hidden/Invulnerable/Missile/Resource(both)/Self/Stasis] exclude and [Visible] required uncheck ally and player
set Target Sorts +: NotHitByBeam1, NotHitByBeam2 and NotHitByBeam3
Now your entire effects chain should be linked together as follows:
Duplicate Photon Cannon and check the following boxes:
Start by swapping the Photon Cannon model under the actor with Beam Tower, the model we created before. Go on to rename the actors Beam Tower and Beam Tower Splat, the turret Beam Tower and the weapon Energy Salvo ("Beam Tower -" in the Editor Prefix field). Now delete any abilities, command card buttons or behaviors you don't want and decide on your structure stats (HP, armor etc).
Go to the weapon
set Effect: Beam Bounce 1 (Set)
set Period: 3.0
set Range: 8
set Random Delay Maximum and Minimum: 0.0
set Damage Display Effect: Beam Bounce 1 (Damage)
set Target Filters: [Dead/Hidden/Invulnerable/Missile/Resource(both)/Self/Stasis] exclude and [Visible] required
Now all we have left is our actors. You should notice that all of your effects are now linked to your unit. You can test it and shoot it, but you won't hear anything and you certainly won't see anything other than units taking damage.
Actors tab
Select actor named Beam Tower
set Scale to (1.0, 1.0, 1.1)
New actor named Beam 1 with Actor Type: Beam (Simple) and Based On: BeamSimpleAnimationStyleOneShot (Unknown)
if your model doesn't automatically link, set Model: Beam 1 (Actor)
set Scale: 0.75, 0.75, 0.75
open Host Launch Site Ops + and enter SOpsHigherBy5 (This causes the beam to shoot from the top instead of the ground)
If you use different beams, make sure they actually have a "Stand" animation to put in "Animation Properties" otherwise they still won't show up. Also, "Time Type:" is how you can control your animation speed. Duration sets the animation to the exact Time Variant while Time Scale applies the Time Variant as a multiplier.
New actor named Beam 2 with Actor Type: Beam (Simple) and Based On: BeamSimpleAnimationStyleOneShot (Unknown)
if your model doesn't automatically link, set Model: Beam 2 (Actor)
New actor named Beam 1 Attack Launch with Actor Type: Action and Based On: GenericAttack
set Beam: Beam 1
set Launch Attachment Query +: Center (Direct)
open Launch Assets + and change sound to Mothership_AttackLaunch
open Impact Map + select the topmost row (Beam1AttackImpact (Unknown)) and set sound to Mothership_AttackImpact
open Events + and create the following event:
Effect - Beam Bounce 1 (Damage) - Start
Create
This actor is what will trigger your sounds and allow your first beam to launch from your structure properly. Keep in mind that a unit will have different attach points so you'll want to pick their weapon for Launch Attachment Query+
New actor named Beam 2 Attack with Actor Type: Action and Based On: GenericAttack
set Beam: Beam 2
set Launch Attachment Query +: Center (Direct)
open Events + and create the following events:
Effect - Beam Bounce 2 (Damage) - Start
Create
Effect - Beam Bounce 3 (Damage) - Start
Create
Effect - Beam Bounce 4 (Damage) - Start
Create
This actor will make sure your bounces connect with the targets and originate from their center so that you don't have strange looking beams.
New actor named Beam Tower Turret with Actor Type: Turret
open Events + and create the following event:
Turret Enable - Beam Tower
Create
This actor will allow your structure to "turn" to attack units. Without this, some structures can't attack at all.
New actor named AoE Splash with Actor Type: Model and Based On: ModelAnimationStyleOneShot
if your model doesn't automatically link, set Model: AoE Splash
open Events + and create the following events:
Actor Creation
AnimPlay (Name: AoE, Animation Properties: Death (this model doesn't have a "Stand" animation), Flags: - , Blend In: -1.0, Blend Out: -1.0, Time Variant: -1.0, Time Type: Automatic)
Effect - Beam Bounce 4 (Splash Damage) - Start
At Effect (Term)
Create
Animation Done
AnimName: AoE (Custom)
Destroy
New actor named AoE Splash Sound with Actor Type: Sound and Based On: SoundOneShot
open Events + and create the following events:
Sound Done
Destroy
Effect - Beam Bounce 4 (Splash Damage) - Start
Create
set Sound: SiegeTank_AttackImpact
With that, you now have a working Beam Chain Tower with an AoE Splash finale! I've attached a test map as a reference. I've also attached a 2nd map illustration a Beam Burst in which a unit fires a beam at a target and then beams fire out from that target at surrounding targets. If you've played red alert, think of the "Prism Tank."
For those interested in making one, keep in mind that the effect chain is as follows:
Weapon > Set > [Buff + Damage] > Search > Damage x N Targets
1 Unit
1 Unit Actor
1 Unit Model
1 Turret
1 Turret Actor
1 Weapon
1 Behavior Buff
5 Effects
2 Beam Actors
2 Beam Attack Actors
2 Beam Models
If you have any questions or concerns you can try here or on the IRC room where I'll be hanging out whenever I'm online and in the editor.
Interesting approach using target sort instead of markers. I've implemented chain lightning a couple of times and usually I set the Marker ID enabled flag under the weapon (or ability) and then add a (No Markers) validator to the damage effect. It requires creating a few less objects that way.
However, the target sort approach is interesting, and I've been looking around for someone who got them to work correctly, so good job.
I used Target Sort because it's more dynamic despite being slightly more involved to make. As mentioned in the tutorial, you can add things like "Lowest life %" or "most HP first" in order to make chain lightning overlap if you have multiple towers. With Marker ID, you can't have two lightning chains hit the same unit . While my setup can't either, I can easily fix that by simply swapping from one Target Sort to the other. So if you are making a TD for example, Target Sorts could be more useful than Marker ID. If you're making an RPG or some other "single unit" chain implementation, then Marker ID would definitely be easier to use :D
Isn't that the opposite of what you're trying to do, i.e. ensure it does not chain to the same unit more than once? If not then I misunderstood what you meant by this statement:
"These will prevent your search effects from picking units hit earlier in the chain."
If you just want to make it so it'll always jump to the same unit, but can jump to a unit which was previously hit early in the chain, you don't need target sorts or markers at all, all you have to do is edit the Exclude field in the Search effect and add Target to it.
And Riley, you understood what I meant in that quote correctly. The Target Sorts are to prevent any unit from being hit multiple times during a single chain of attacks. My understanding is that with Markers you either have them "On" and you're not able to hit any target more than once or they are "Off" and it's a FFA in terms of what gets hit. With Target Sorts you don't have the either or. You can have it bounce to unique targets, bounce to the targets with the most/least % health etc.
In other words if there are only 3 targets but you bounce 5 times, with a Target Sort to "most health" it'll go:
Target 1 > Target 2 > Target 3 > Target (1/2/3) depending on health > Target (1/2/3) depending on health
With Markers it would only strike 3 times and the other 2 hits wouldn't land. If that is something you can do with Markers as well then I'll take it all back and would love to know how :D
Okay I think I see what you mean now, you want it so that it'll prioritize units that haven't been hit yet when searching for new targets to bounce to, but if there aren't any than it can bounce to a unit it's already hit. In that case target sorts are a clever way to go but you might want to clarify how the effect works since the sentence I quoted above seems to imply that the attack should never bounce to the same target more than once.
In the tutorial, it works exactly as you first thought it did. The Target Sorts being used require unique targets so my sentence is accurate. However, when you brought up Markers (another great way to make chains), I was pointing out that I used Target Sorts instead of Markers because it is the most dynamic way create an adaptable beam chain.
I included behaviors, validators and target sorts so that anyone who uses my tutorial can make their beam chain do just about anything they can imagine. It's far more complex, yes, but that was done on purpose as this tutorial is aimed at experienced users who are struggling to get a beam chain that does what they want.
Technically, all you need to make a beam chain is:
Weapon Fire > Set > [Search + Damage] > Set > [Search + Damage] > ....
With your damage effects having Location+ linked to the previous search. Then you can quickly enable Marker IDs and add the "No Markers" Validator.
@ralme360 that's the NullifierBeam.m3 correct? If so, I'm actually using it in my tutorial. That actor event is actually fine. What's likely the problem is the Animation Play for both models:
Actor Creation
AnimPlay (Name: AoE, Animation Properties: Death (this model doesn't have a "Stand" animation), Flags: - , Blend In: -1.0, Blend Out: -1.0, Time Variant: -1.0, Time Type: Automatic)
I assume you used this, but have a different explosion. With automatic it bases it's animation time on the models actual scene length (time from start to finish). So if it's only got a length of 0.5 it's going to explode and disappear very quickly. You can fix this by changing the Time Type: to Duration and setting the exact time you want with Time Variant: If you don't want an exact time use Time Scale and it will apply a multiplier to the scene length. This is more touchy though as you need to know the length ahead of time. Duration gives you exact control.
For the beam it's likely that you have Animation Properties: set to an animation the model doesn't have. Check your animation in the previewer. In bottom it should show a red bar and then a smaller bar with a word on it. That's the animation it's using in the previewer. Right click on it and go to "change animation" to see what other variations it has. When you've decided which one you want, that's the name you put into the Animation Properties: If it has a number (as in the case of VoidRayMissile) you would do Attack (1st drop down menu), Variation N (2nd drop down menu)
Prozaic - great tutorial man. Thanks for writing all of this up - very helpful for newcomers like me. :)
I am having some problems though. I followed your instructions as accurately as possible, but the beam animations don't show up. I've tried to recheck the fields for the actors but the few differences I did find between my map & your test map didn't accomplish anything.
Also, how come there is no final AoE against Zerglings?
There are a few reasons why your beams might not be showing up even if you have the same actions and events (though I recommend double checking).
1) If you didn't set the "Launch Locations" on the Damage effects correct, you'll end up with the beams being told to start from the point where the damage launches (it's target) and end where it lands (its target as well). This makes your beams become dots which usually don't show up. In some cases you might see little flashes of light which hints that this is the case.
2) If you failed to put a search on the first buff or the apply behavior in the first set, the entire chain will be unlinked from the attack. This is a very easy mistake to make given how many effects you're trying to link together. It's always a good idea to walk through the chain from beginning to end by physically clicking on each field and seeing what it points to (target) and where it points from (launch).
3) Another common mistake is to use the same Animation Properties as I did with different beams. For example, some beams only have Birth and Death or even just Stand. In this case if I say to use Death but it doesn't have that animation, it won't show up. This just gets worse if you used the same beam for multiple bounces. Check your animations in the previewer to see if they actually have the animation variation you're telling the actor events to create.
If none of this solves your problem, shoot me a PM with your map uploaded some where and I'll take a peak :)
Also, for the AoE, that has to do with how I've setup the beam chain. Try taking 1-2 zealots to attack the tower with. You'll notice no AoE goes off. You might also notice that sometimes an attack won't land when a unit dies mid-chain. This has to do with how the chain is currently configured. If you look through the effects the majority of them have a launch location of "Source Unit." That means that if the source unit dies, no more bouncing. In my experience this isn't always the case as you've obviously killing the zerglings in one hit, but it still kills 3 at a time (3/4 bounces). Thus far I haven't figured out an exact way to tell what will and won't land, down the road I might do so and update this tutorial. I DO know, however, that if you lower the damage so that it doesn't kill the Zerglings in 1 hit, all the attacks land. You can test this by making each bounce damage 1 and the splash damage 100. All the hits will land and the splash will go off :)
I've been looking for a tutorial like this. :D It is very well made and I found it quite easy to follow. The same is true with all of your tutorials. Thank you for this. :)
Tried to make this an ability and failed miserably.
I called the ability Destruction gave it a range of 9 and set the effect to "Beam Bounce 1 Set" . Do I need another effect to make the ability work correctly?
I have narrowed it down to the ability starting way up high like 5 (virtual) feet above the character. This makes its range MUCH shorter. I can sit there and attack myself with it but it will rarely attack anything else.
Prozaic, I believe the buff approach is flawed. From what I understand, your chain applies .5 second duration behavior. But if multiple cannons are firing at the same targets, then they will get confused with each others' behaviors and not fire appropriately. Correct me if I'm wrong, but as far as I know, there's no way to check the source of a behavior in a separate ability, especially on a separate unit.
Instead, you might be able to use the "Exclude +" field in your searches to exclude the target of the previous chain effect.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
If you are looking for an beginner level tutorial, start with my Beams Tutorial
What separates this tutorial from other bounce attack tutorials? We WON'T be using missiles. Period. I've read the tutorials, seen the videos and frankly I'm not impressed with missile based chain lightning. It's a messy and restrictive way of connecting the dots. Before we begin, take a look at this picture:
This is a custom Structure with a custom model that shoots a beam bouncing 3 times and finishing with an AoE splash. This means we'll need to make the following:
1 Unit
2 Unit Actors
1 Unit Model
1 Turret
1 Turret Actor
1 Weapon
3 Behavior Buffs
3 Validators
3 Target Sorts
15 Effects
2 Beam Actors
2 Beam Attack Actors
2 Beam Models
1 AoE Actor
1 AoE Sound Actor
1 AoE Model
It seems like a lot, but that's because we're adding extra parts. We'll be using the Previewer (Ctrl + Shift + V) to select models and effect animations that aren't currently in use, so let's start there:
We want to make our Beam-chain as cool as possible, so let's start by going to Assets > Doodads. Scroll down to Temple Column > TempleColumn_17.m3. Double click it and check out this awesome doodad that will soon be our tower of death. It is important to note that it doesn't have any attachments, so we will be restricted on where the lightning originates: the ground. However, we can create a workaround by applying a Site Operator to the beam's actor causing it to shoot from a height above the ground. If this bothers you, choose a structure model with attachment points. Now that we have our desired model, let's pick out some effects. I decided to use MothershipPhotonBeam.m3 as the first attack, NullifierBeam.m3 as the 3 bounce attacks and DetonateImpact.m3 as the final AoE. Keep track of the models you chose unless you're going to follow along with me. Close the Previewer and open the Data Editor (F7). From here on out I'm going to short hand as much as possible.
I could fill several pages with heavy details, but for the sake of brevity I'm going to expect you to have intermediate knowledge of the Data Editor. If you DON'T, you should probably start with other tutorials before reading this.
Models tab
You may be tempted to mess with sizes and so for, but don't. This is your generic model. We will use actors to change anything and everything we want. This prevents redundancies.
Effects tab
We'll come back to these effects after creating other parts of the chain
Behaviors tab
For whatever reason, the last buff in your chain must apply it's effect at the end of its period or it won't register at all. It doesn't change a whole lot mechanic wise other than that you have to remember this or you'll find yourself 1 beam short. In our case it would mean no AoE splash either and we certain don't want to lose our big explosion!
Now you might be confused as to why we're making behaviors and why our behaviors are search for targets. The simple explanation is that applying buffs to a target allows you to change the buffed unit to the origin of any effects it activates. This is how you "chain" attacks. Without buffs, all of your beams would shoot from your unit/structure despite the damage being chained. You could argue this is exactly the same as missiles, but there is a one major difference: buffs allow you to directly apply behaviors while continuing the chain. With missiles you would need behaviors AND missiles in order to achieve the same thing. The best example would be an implementation of WC3's healing wave. Using buffs, your effect sequence would be:
Apply Behavior > Buff > Search > Apply Behavior > Buff > Search > etc
The best part is you can even use Search Target Sorts to pick units with the lowest health % first. Your buff could even add a HoT to boot! Now imagine using missiles to achieve the same thing. . . . nightmare!
Validators tab
These will prevent your buffs from stacking.
Effects tab
Now let's link everything together
Target Sorts tab
These will prevent your search effects from picking units hit earlier in the chain.
Effects tab
Now your entire effects chain should be linked together as follows:
Set 1 > [Buff 1 + Damage 1] > Search 1 > Set 2 > [Buff 2 + Damage 2] > Search 2 > Set 3 > [Buff 3 + Damage 3] > Search 3 > Set 4 > [Damage 4 + Splash Damage]
Units tab
Start by swapping the Photon Cannon model under the actor with Beam Tower, the model we created before. Go on to rename the actors Beam Tower and Beam Tower Splat, the turret Beam Tower and the weapon Energy Salvo ("Beam Tower -" in the Editor Prefix field). Now delete any abilities, command card buttons or behaviors you don't want and decide on your structure stats (HP, armor etc).
Go to the weapon
Now all we have left is our actors. You should notice that all of your effects are now linked to your unit. You can test it and shoot it, but you won't hear anything and you certainly won't see anything other than units taking damage.
Actors tab
If you use different beams, make sure they actually have a "Stand" animation to put in "Animation Properties" otherwise they still won't show up. Also, "Time Type:" is how you can control your animation speed. Duration sets the animation to the exact Time Variant while Time Scale applies the Time Variant as a multiplier.
This actor is what will trigger your sounds and allow your first beam to launch from your structure properly. Keep in mind that a unit will have different attach points so you'll want to pick their weapon for Launch Attachment Query+
This actor will make sure your bounces connect with the targets and originate from their center so that you don't have strange looking beams.
This actor will allow your structure to "turn" to attack units. Without this, some structures can't attack at all.
With that, you now have a working Beam Chain Tower with an AoE Splash finale! I've attached a test map as a reference. I've also attached a 2nd map illustration a Beam Burst in which a unit fires a beam at a target and then beams fire out from that target at surrounding targets. If you've played red alert, think of the "Prism Tank."
For those interested in making one, keep in mind that the effect chain is as follows:
Weapon > Set > [Buff + Damage] > Search > Damage x N Targets
1 Unit
1 Unit Actor
1 Unit Model
1 Turret
1 Turret Actor
1 Weapon
1 Behavior Buff
5 Effects
2 Beam Actors
2 Beam Attack Actors
2 Beam Models
If you have any questions or concerns you can try here or on the IRC room where I'll be hanging out whenever I'm online and in the editor.
Interesting approach using target sort instead of markers. I've implemented chain lightning a couple of times and usually I set the Marker ID enabled flag under the weapon (or ability) and then add a (No Markers) validator to the damage effect. It requires creating a few less objects that way.
However, the target sort approach is interesting, and I've been looking around for someone who got them to work correctly, so good job.
I used Target Sort because it's more dynamic despite being slightly more involved to make. As mentioned in the tutorial, you can add things like "Lowest life %" or "most HP first" in order to make chain lightning overlap if you have multiple towers. With Marker ID, you can't have two lightning chains hit the same unit . While my setup can't either, I can easily fix that by simply swapping from one Target Sort to the other. So if you are making a TD for example, Target Sorts could be more useful than Marker ID. If you're making an RPG or some other "single unit" chain implementation, then Marker ID would definitely be easier to use :D
Quote from ProzaicMuze:
With Marker ID, you can't have two lightning chains hit the same unit .
----
That's definitely not true.
So you're able to achieve the following with your Marker IDs?
Weapon Fires > Hits Target 1 > Hits Target 2 > Hits Target 1 again > Hits Target 3
Small typo ;)
Apart from that, very good! I've never used target sort before (I've barely used the data editor at all) but I can say I've learned something new.
The Dominion needs your help: http://us.starcraft2.com/dominion/
Quote from ProzaicMuze:
So you're able to achieve the following with your Marker IDs?
Weapon Fires > Hits Target 1 > Hits Target 2 > Hits Target 1 again > Hits Target 3
----
Isn't that the opposite of what you're trying to do, i.e. ensure it does not chain to the same unit more than once? If not then I misunderstood what you meant by this statement:
"These will prevent your search effects from picking units hit earlier in the chain."
If you just want to make it so it'll always jump to the same unit, but can jump to a unit which was previously hit early in the chain, you don't need target sorts or markers at all, all you have to do is edit the Exclude field in the Search effect and add Target to it.
Typo fixed :D
And Riley, you understood what I meant in that quote correctly. The Target Sorts are to prevent any unit from being hit multiple times during a single chain of attacks. My understanding is that with Markers you either have them "On" and you're not able to hit any target more than once or they are "Off" and it's a FFA in terms of what gets hit. With Target Sorts you don't have the either or. You can have it bounce to unique targets, bounce to the targets with the most/least % health etc.
In other words if there are only 3 targets but you bounce 5 times, with a Target Sort to "most health" it'll go:
Target 1 > Target 2 > Target 3 > Target (1/2/3) depending on health > Target (1/2/3) depending on health
With Markers it would only strike 3 times and the other 2 hits wouldn't land. If that is something you can do with Markers as well then I'll take it all back and would love to know how :D
@ProzaicMuze:
Okay I think I see what you mean now, you want it so that it'll prioritize units that haven't been hit yet when searching for new targets to bounce to, but if there aren't any than it can bounce to a unit it's already hit. In that case target sorts are a clever way to go but you might want to clarify how the effect works since the sentence I quoted above seems to imply that the attack should never bounce to the same target more than once.
In the tutorial, it works exactly as you first thought it did. The Target Sorts being used require unique targets so my sentence is accurate. However, when you brought up Markers (another great way to make chains), I was pointing out that I used Target Sorts instead of Markers because it is the most dynamic way create an adaptable beam chain.
I included behaviors, validators and target sorts so that anyone who uses my tutorial can make their beam chain do just about anything they can imagine. It's far more complex, yes, but that was done on purpose as this tutorial is aimed at experienced users who are struggling to get a beam chain that does what they want.
Technically, all you need to make a beam chain is:
Weapon Fire > Set > [Search + Damage] > Set > [Search + Damage] > ....
With your damage effects having Location+ linked to the previous search. Then you can quickly enable Marker IDs and add the "No Markers" Validator.
Is that more clear?
@ProzaicMuze:
Alright I see what you're saying now. Good job on going the extra mile then.
Thank you kindly :)
Hi great tutorial.
But i fail at some stuff.... The beam does not look like yours, its the Sentry attack beam, not like your lightning beam. :(
And I think i screw up on the actor event:
Also the AoE disappears too fast. Its just a split second and then gone..
Everything else worked fine i think... ;)
Thanks for great tut!
@ralme360 that's the NullifierBeam.m3 correct? If so, I'm actually using it in my tutorial. That actor event is actually fine. What's likely the problem is the Animation Play for both models:
I assume you used this, but have a different explosion. With automatic it bases it's animation time on the models actual scene length (time from start to finish). So if it's only got a length of 0.5 it's going to explode and disappear very quickly. You can fix this by changing the Time Type: to Duration and setting the exact time you want with Time Variant: If you don't want an exact time use Time Scale and it will apply a multiplier to the scene length. This is more touchy though as you need to know the length ahead of time. Duration gives you exact control.
For the beam it's likely that you have Animation Properties: set to an animation the model doesn't have. Check your animation in the previewer. In bottom it should show a red bar and then a smaller bar with a word on it. That's the animation it's using in the previewer. Right click on it and go to "change animation" to see what other variations it has. When you've decided which one you want, that's the name you put into the Animation Properties: If it has a number (as in the case of VoidRayMissile) you would do Attack (1st drop down menu), Variation N (2nd drop down menu)
Let me know if this solves the problem :D
Prozaic - great tutorial man. Thanks for writing all of this up - very helpful for newcomers like me. :)
I am having some problems though. I followed your instructions as accurately as possible, but the beam animations don't show up. I've tried to recheck the fields for the actors but the few differences I did find between my map & your test map didn't accomplish anything.
Also, how come there is no final AoE against Zerglings?
There are a few reasons why your beams might not be showing up even if you have the same actions and events (though I recommend double checking).
1) If you didn't set the "Launch Locations" on the Damage effects correct, you'll end up with the beams being told to start from the point where the damage launches (it's target) and end where it lands (its target as well). This makes your beams become dots which usually don't show up. In some cases you might see little flashes of light which hints that this is the case.
2) If you failed to put a search on the first buff or the apply behavior in the first set, the entire chain will be unlinked from the attack. This is a very easy mistake to make given how many effects you're trying to link together. It's always a good idea to walk through the chain from beginning to end by physically clicking on each field and seeing what it points to (target) and where it points from (launch).
3) Another common mistake is to use the same Animation Properties as I did with different beams. For example, some beams only have Birth and Death or even just Stand. In this case if I say to use Death but it doesn't have that animation, it won't show up. This just gets worse if you used the same beam for multiple bounces. Check your animations in the previewer to see if they actually have the animation variation you're telling the actor events to create.
If none of this solves your problem, shoot me a PM with your map uploaded some where and I'll take a peak :)
Also, for the AoE, that has to do with how I've setup the beam chain. Try taking 1-2 zealots to attack the tower with. You'll notice no AoE goes off. You might also notice that sometimes an attack won't land when a unit dies mid-chain. This has to do with how the chain is currently configured. If you look through the effects the majority of them have a launch location of "Source Unit." That means that if the source unit dies, no more bouncing. In my experience this isn't always the case as you've obviously killing the zerglings in one hit, but it still kills 3 at a time (3/4 bounces). Thus far I haven't figured out an exact way to tell what will and won't land, down the road I might do so and update this tutorial. I DO know, however, that if you lower the damage so that it doesn't kill the Zerglings in 1 hit, all the attacks land. You can test this by making each bounce damage 1 and the splash damage 100. All the hits will land and the splash will go off :)
@ProzaicMuze: Go
I've been looking for a tutorial like this. :D It is very well made and I found it quite easy to follow. The same is true with all of your tutorials. Thank you for this. :)
Awesome tutorial, really helped me out. Thanks for taking the time to share :D
Tried to make this an ability and failed miserably.
I called the ability Destruction gave it a range of 9 and set the effect to "Beam Bounce 1 Set" . Do I need another effect to make the ability work correctly?
I have narrowed it down to the ability starting way up high like 5 (virtual) feet above the character. This makes its range MUCH shorter. I can sit there and attack myself with it but it will rarely attack anything else.
Prozaic, I believe the buff approach is flawed. From what I understand, your chain applies .5 second duration behavior. But if multiple cannons are firing at the same targets, then they will get confused with each others' behaviors and not fire appropriately. Correct me if I'm wrong, but as far as I know, there's no way to check the source of a behavior in a separate ability, especially on a separate unit.
Instead, you might be able to use the "Exclude +" field in your searches to exclude the target of the previous chain effect.