Note, that this method does not provide the correct kill credit (if this is of any importance for your map). The caster will not get a kill, but the missile projectile unit.
To circumvent this, you can either use the Kill Credit field of the behavior and let your caster apply it to the projectile unit, or you skip the behavior.
Also, please let me know, if you find a data solution to the cliff collision. I know of 2 solutions, which both have their shortcomings (the pathing check and a cliff level comparison, which makes the projectile collide with ramps and not with doodads, also it looks awkward)


OneTwoSC AuthorIn this tutorial I build upon my Diablo Controls map and add a new spell: A fireball spell that travels along a line (towards a point) and hits any unit or doodad or cliff on the way!
This tutorial can be applied to your own map but to follow me exactly you'll need this map:
http://www.mediafire.com/?bf2ll22jzscnlwa
If you want the final finished map, here it is too:
http://www.mediafire.com/?zfg8mpsctf9brab
Video version:
http://www.youtube.com/watch?v=c3UVVG9C80o
Text Tutorial
Links to the relevant part of my video tutorial is provided for each step (since this is a very brief/no-explanation text tutorial).
Like I mentioned above, to follow precisely you'll need my map from the last Diablo tutorial: http://www.mediafire.com/?bf2ll22jzscnlwa
Otherwise, you can follow along and change it to fit your non-diablo map.
Basic idea of the tutorial: Making a fireball that travels to a target point and hits the first target along the way (or none).
Open the Data Editor.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=2m0s
Switch to the Abilities tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=2m39s
Copy+Paste (do not duplicate!!) Battlecruiser - Yamato Gun.
Now we need a dummy effect for where you click with the spell, then a missile effect, and then a missile unit.
Switch to Effects tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=5m0s
Right-Click anywhere in the list and choose Add Effect.
Copy+Paste Battlecruiser - Yamato Cannon (Missile).
http://www.youtube.com/watch?v=c3UVVG9C80o#t=5m50s
Switch to Units tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=7m12s
Duplicate Weapon - Yamato and check off everything.
Other than that, the missile unit is done. We duplicated everything there so you could mess with its mover, model, or actor etc... but I'm happy with the yamato's settings for it. Note: If you want to change the speed, see maticpl's post down below
Go to the Effects tab now.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=8m59s
Click on our Fireball Missile effect.
Now switch to the Abilities tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=9m23s
Find our Fireball ability.
Now switch to the Actors tab.
Let's make it actually have some visuals!
Find 'Battlecruiser Yamato Attack' and copy paste it.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=10m05s
Our missile still needs to 'hit' a target along its path (right now it'll just fly by them)...
So, switch to the Effects tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=12m10s
Copy+Paste Battlecruiser - Yamato Cannon (Damage).
Now right-click in the effect list and go Add Effect.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=13m11s
Now for this new set effect, double-click on the Effect-Effects field.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=13m35s
Now again in the left pane right-click and go Add Effect.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=14m37s
Now for our new search effect:
http://www.youtube.com/watch?v=c3UVVG9C80o#t=14m53s
Now switch to the Behaviors tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=17m20s
Right-click and Add Behavior.
Now for our new behavior:
http://www.youtube.com/watch?v=c3UVVG9C80o#t=17m50s
Now switch to the Units tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=18m45s
Click on our Weapon - Fireball.
Now our ability should launch a fireball that rapidly searches under itself for any enemy units, and if it finds one it suicides and does damage to that found unit...
However, it won't play a cool 'explode' animation when it hits a target atm, so let's remedy that.
Switch to the Actors tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=20m01s
Right-click and Add Actor.
Now for our new actor:
http://www.youtube.com/watch?v=c3UVVG9C80o#t=20m28s
Again in actors, right-click and Add Actor.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=21m55s
For this new sound actor:
http://www.youtube.com/watch?v=c3UVVG9C80o#t=22m18s
Switch to the Units tab next.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=23m07s
We need the Zealot to cast it now so click onto our Zealot unit.
Next, we go into the Trigger Editor to setup the casting of it. Note: if you were putting this into your own map then this next part is irrelevant. BUT, you should make sure your Fireball has a proper button and that it's on the Zealot's Command-Card.
Open the Trigger Editor
http://www.youtube.com/watch?v=c3UVVG9C80o#t=23m47s
In the Spells folder, copy+paste Change To Spell 3 (Guardian Shield).
This is the great thing about the way we set up the Diablo map. Very easy to add new abilities into the system!
Go test and check it out!
Bonus:
You may notice however that you can cast through doodads and up cliffs etc... I haven't found a perfect fix for this. But what we can do is change our missile so that it also checks for no-pathing.
To do this, we will be adding a 2nd behavior to our missile that periodically checks for no pathing underneath it (and if so, suicide). Let's start from the ground up though.
Open the Data Editor.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=26m30s
Switch to the Validators tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=27m0s
Right-click and Add Validator.
For our new validator:
http://www.youtube.com/watch?v=c3UVVG9C80o#t=28m06s
Switch to the Effects tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=28m35s
Find Suicide (should be gray) and copy-paste it.
Now switch to the Behaviors tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=29m52s
Copy+Paste our 'Fireball Find Target' behavior.
Switch to the Units tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=31m0s
Find our Weapon-Fireball unit and click on it.
Now head into the Actors tab.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=31m38s
Click on Fireball Hit Target Explode Model.
Click on Fireball Hit Target Sound.
http://www.youtube.com/watch?v=c3UVVG9C80o#t=32m05s
Now if you go test it'll hit into walls/doodads. It's not perfect I'll admit but it's what I've figure out at the moment. Feel free to explore other ways to do collision. Note: One bug is when shooting down cliffs it'll probably explode...
Thanks for reading and feel free to post comments :)
SC2 video tutorials: http://www.youtube.com/onetwosc
p.s. I've quit mapping since Nov 2011.