HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help With Spells Please

08-24-2008, 07:06 AM#1
Axzarious
Okay, Well, I have decided to enter the spell tournament, although I probably wont win anything as I cant really do anything overly fancy.

My first spel is a standardized lightning bolt that works like shockwave (Kinda inspired by the dungeons and dragons spell, damage in a line), however the main problem is this- I cant damage the units in a line up to the target point. I can create a lightning effect there, but if you aim say halfway between you and the unit they will still take damage even when not hit by the bolt... Although there is an electrical effect at the very end, so I guess it could be static energy or something. If I could fix this it would be awsome, especially if I could make it so that the lightning effect goes all the way to the final point of the shockwave instead of only part way (wherever you cast the ability).


My second spell Idea that I could code is this- You send a damaging progectile (again like shockwave, but im using carrion swarm), which then again explodes at the target point into other carrion swarms forming 8 in a ring..... However, no matter what I tried, I could not get more than one to fire in a single trigger, and If I used more than one, only one would fire.
So then I tired this: I used 8 triggers for the different gradiants, but alas, only 7 of the 8 fire... And its always the same one (Bottom right one) I know it fires, because when I disable one other triggers it fires. Also If I use a remove unit funtion on all of them only one will fire, so I am currently using negative health regen to kill the dummies. Heres an example of one of the triggers for this spell-

Trigger:
Collapse Events
Unit- A Unit Begins casting an ability
Conditions
Collapse Actions-
If (All Conditions are True) then do (Then Actions) else do (Else actions)
Collapse If - Conditions
(Ability being cast) Equal to Breath Of The Dying
Collapse Then- Actions
Wait 1.00 Seconds
Unit- Create 1 caster (Caster System) for (Owner of (Triggering Unit)) at ((Target point og ability being cast) offset by 0.00, 0.00)) facing Default Building degrees
Unit- Add BotD Dummy skill to (Last created unit)
Unit- Set level of BotD Dummy Skill for (last created unit) to (Level of Breath Of The Dying for (Casting Unit))
Unit- Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Target poinf of ability being cast) offset by 190.00 towars 0.00 degrees)
Else - Actions
Do nothing


Any help would be greatly appreciated, and it would also help me get my map done faster, as theres only a few more item things left until the open beta, and this spell olimpics thing kind of corresponds to these items as well, lol. Thanks for your time.
08-24-2008, 07:35 AM#2
Pyrogasm
Well, I don't really understand your problem with the first spell, so you ought to post up the triggers that you have for that.

As for the second trigger, you're leaking a few locations and some of it isn't going to work properly. For instance, "Casting Unit" fails after a wait; however, "Triggering Unit" (which is equivalent) does not. Also, "A Unit Begins casting" is not the proper event to use, so instead you should use "A unit starts the effect of an ability" because that fires the trigger at the proper time; "Beings Casting" fires before manacost/cooldown are spent whereas "Starts the Effect of" does not.

Finally, all 8 of your triggers can be consolidated into one as shown:
Trigger:
Collapse Events
Unit- A Unit starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Breath Of The Dying
Collapse Actions
Wait 1.00 Seconds
Set TempPoint1 = (Target Point of Ability being cast)
Collapse For each (Integer A) from 1 to 8 do (Actions)
Collapse Loop - Actions
Unit- Create 1 caster (Caster System) for (Owner of (Triggering Unit)) at TempPoint1 facing Default Building degrees
Unit- Add BotD Dummy skill to (Last created unit)
Unit- Set level of BotD Dummy Skill for (last created unit) to (Level of Breath Of The Dying for (Triggering Unit))
Set TempPoint2 = (TempPoint offset by 190.00 towards (45.00 x Real(Integer A)) degrees)
Unit- Order (Last created unit) to Undead Dreadlord - Carrion Swarm TempPoint2
Custom script: call RemoveLocation(udg_TempPoint2)
Custom script: call RemoveLocation(udg_TempPoint1)
And of course if you don't know what I mean by "leaking" then you ought to go look it up.
08-24-2008, 08:00 AM#3
Axzarious
Thanks Pyrogasm. I know what a leak is, but I dont really know what leaks.

For my lightning bolt spell heres what I got

Trigger:
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) equal to Lightning Bolt
Collapse Actions
Wait 0.25 seconds
Sound - Play LightningBolt <gen> at 100.00% volume, located at (Position of (Triggering unit)) with Z offet 0.00
Lightning- Create a Lightning Attack effect from source (Position of triggering unit)) to target (Target point of ability being cast)
Special Effect- Create a special effect at ((Target pont of ability being cast) offset by (0.00,0.00)) using Abilities\Weapons\Bolt\BoltImpact.mdl
Wait 0.15 seconds
Lightning - Destroy (Last created lightning effect)

For all purposes its a featureless shockwave, but slightly modified to be narrower. So If I can get the thing to always fire at max range, and you are using something to detect if the units are damaged in a line, one thing that I would have liked to add would have units effected be purged. If you want me to post the map I will.
08-24-2008, 05:34 PM#4
Anopob
If I understand correctly, your base spell (Shockwave) will make a shockwave (or whatever model) the distance inside the Object Editor value no matter what (so even if you click right beside your unit, it will go all ways). I'm not really sure what you mean by "click half way and it still hurts the unit" so I hope this is right. Also, for the trigger you still need to use "Starts effect of an ability" instead of "begins casting an ability".
08-24-2008, 06:50 PM#5
Axzarious
Well, I removed whe shockwave model. The spell basically throws a lightning bolt at the poin that you cast shockwave. Since the projectile is removed, you could essentially be blasting the area just before your enemy, but they are still damaged by an invisible shockwave (Although it still does have a lighting effect at the end of it even if you dont see it). I dont know of any other way to do this spell other than a lightening effect (And no, I dont want to use multiple mini projectiles). The reason I have to tuse a lightning effect is because none of the spells will actuall shoot a bolt that acts like shockwave/carrion swarm.
08-25-2008, 04:00 AM#6
Anopob
You could trigger it, eg. put the lightning and THEN do damage or throw a shockwave.