Shockwave that heals allies, damages undead

I_RULE_YOU

New Member
Reaction score
34
I'm trying to create an ability called Twilight's Hammer, throws a hammer down a line (its based off shockwave). I want to know how id make the hammer heal allies it hits and damage enemy undead units it hits.
 

FireBladesX

Eating my wings!
Reaction score
123
Tough one, heh.
You would be best off creating a dummy, adding the Twilight Hammer ability to it, setting level of Twilight Hammer for the dummy to (Level of Ability Being Cast for Triggering Unit), then using a periodic trigger to slide the dummy unit, set the dummy unit to the variable tmpUnit, and pick every unit in a 150 radius of your dummy unit and do If, Then, Else:
If Picked Unit is an ally of tmpUnit
Then -
Unit - set life of Picked Unit to Life of Picked Unit + 50 x Level of Twilight Hammer for tmpUnit
Else -
If Picked Unit is Undead and Picked Unit is an enemy of tmpUnit, then do:
Unit - cause tmpUnit to damage Picked Unit 50 x Level of Twilight Hammer for tmpUnit


Please ask if you don't get any part of it. I was sorta informal in writing it.
 

vypur85

Hibernate
Reaction score
803
Hmmm.... Is it possible to use negative damage for Shockwave? If so, you only need 2 sets of Shockwave. One targets allies (negative damage) and another targets enemies (positive damage). The damaging Shockwave is the hero ability. When the hero casts, create another dummy to cast the healing Shockwave. I've not tested if Shockwave can deal negative damage. But if it's possible then this should be the easiest way. :)
 

FireBladesX

Eating my wings!
Reaction score
123
It is quite possible to do negative damage, but then the positive damage shockwave is not limited to undead.

And, shockwave cannot hit allies no matter how hard you try. One of warcrafts' lame quirks. Funny, I was just saying this in another thread. What are the odds, I wonder?
 

I_RULE_YOU

New Member
Reaction score
34
@ fireblades

I get what your saying, but I have no idea what those triggers would look like or how I would make them.:confused:
 

Cloak_Master

Active Member
Reaction score
41
I made it for you real quick, if theres any problems, tell me.

Okay, I made it different the first time, should be great now.
 

I_RULE_YOU

New Member
Reaction score
34
First off, I want to thank you for taking the time to do this for me :D

I saw a few problems. The hammer healed only allied Undead units. it did not heal allied living units. It also didn't deal the damage to enemies, living or dead.

I want the spell to heal allied living units, and damage enemy undead with "Holy Light" art. Should have been a little more specific, I didn't say I wanted living units healed only.
 

Cloak_Master

Active Member
Reaction score
41
First off, I want to thank you for taking the time to do this for me :D

I saw a few problems. The hammer healed only allied Undead units. it did not heal allied living units. It also didn't deal the damage to enemies, living or dead.

I want the spell to heal allied living units, and damage enemy undead with "Holy Light" art. Should have been a little more specific, I didn't say I wanted living units healed only.

I changed it to those specifications a few hours ago, re-dl :)

Oopf, wrong map, one sec >.<
 

I_RULE_YOU

New Member
Reaction score
34
I downloaded it 20 minutes ago. I downloaded again when I saw this post, and it was the exact same map. Are you sure you uploaded the right version? :eek:
 

Cloak_Master

Active Member
Reaction score
41
Sorry about that, total mix-up. Should be good now. And no thanks necessary, took me 10 minutes to plug into my generic ability map.

One small thing you might want to do is set the custom value of the hero to 1 when he casts it, and then reset it. It's causing him to get healed, too small a fix to warrant a re-upload.
 

I_RULE_YOU

New Member
Reaction score
34
Well, first off I gotta say I love the way it looks, exactly what I'm looking for. Heres what happened:

1. It healed allied undead.
2. It healed enemy living.
3. it damaged enemy undead (good)
4. It healed the crap out of the caster. Like 100 holy lights each time he used it.
5. It killed allied undead units qwhen they were at low health, but otherwise completely healed them.
6. The heal fully healed units, idk if it was supposed to do that.
7. It was lopsided so to speak when I used it, it wouldnt heal all units in the path, just a few in random locations sometimes.

It was near impossible for it to land any hits on undead, I'd fire it at a group of 20 units and only 2-3 would wind up getting hit, while the hero is hit 50 times.
 

Cloak_Master

Active Member
Reaction score
41
It will only affect what it hits in a line. It's a perfect line with a little breathing room, I'll fix those other problems.

Here you go, I'll look at that problem...

Works fine on a large group of ghouls in the test map. idk. Could be a port problem.
 

I_RULE_YOU

New Member
Reaction score
34
I fired it directly into a large group of abominations and 1 at the middle and 2 at the end were hit. With the heal it was pretty wide, alot of units got healed. So width isnt a problem.
 

FireBladesX

Eating my wings!
Reaction score
123
Ok, I looked at the map, and I'll post the code so people don't have to DL.

Code:
Twilight Hammer
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Twilight Hammer (Neutral Hostile)
    Actions
        Unit - Set the custom value of (Casting unit) to 1
        Set Temp_Point = ((Position of (Casting unit)) offset by 10.00 towards (Facing of (Casting unit)) degrees)
        Set Facing = (Facing of (Casting unit))
        Set Unit = (Casting unit)
        Trigger - Turn on Slide <gen>
        Wait 1.00 seconds
        Unit - Set the custom value of (Casting unit) to 0
        Trigger - Turn off Slide <gen>
        Set units = (Units in (Playable map area))
        Unit Group - Pick every unit in units and do (Actions)
            Loop - Actions
                Unit - Set the custom value of (Picked unit) to 0
and (this one is periodic, now)
Code:
Actions
    Set Temp_Point = (Temp_Point offset by 10.00 towards Facing degrees)
    Set units = (Units within 150.00 of Temp_Point)
    Unit Group - Pick every unit in units and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    ((Picked unit) is Undead) Equal to True
                    (Custom value of (Picked unit)) Equal to 0
                    ((Picked unit) belongs to an ally of (Owner of Unit)) Equal to False
                Then - Actions
                    Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 150.00)
                    Unit - Set the custom value of (Picked unit) to 1
                    Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                    Special Effect - Destroy (Last created special effect)
                    Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
                    Special Effect - Destroy (Last created special effect)
                Else - Actions
    Unit Group - Pick every unit in units and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    Or - Any (Conditions) are true
                        Conditions
                            ((Picked unit) belongs to an ally of (Owner of Unit)) Equal to True
                            (Owner of (Picked unit)) Equal to (Owner of Unit)
                    (Custom value of (Picked unit)) Equal to 0
                    ((Picked unit) is Undead) Equal to False
                Then - Actions
                    Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 150.00)
                    Unit - Set the custom value of (Picked unit) to 1
                    Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                    Special Effect - Destroy (Last created special effect)
                Else - Actions
    Custom script:   call DestroyGroup (udg_units)
My comments:
Not MUI or MPI, cannot be used if you already use custom values, and there's a periodic point leak.
Yet!
Should work perfectly, with the exception of getting credit for kills. Easily fixed, IMO. Just set the sliding unit to a tmpUnit variable, or set the caster to a variable and have it damage the picked unit.

My suggestion is, seeing as it's not MUI or MPI anyways, you might as well set the sliding unit to a unit variable, and instead of setting tmpPoint to tmpPoint + 12 towards realFacing variable (whatever its called), you can set it to the position of the sliding unit offset by 12, facing (facing of the sliding unit), then not use that facing variable. You will need a second temporary point variable, however.
 

Trithilon-V2

New Member
Reaction score
20
Guyz...how the hell did you people plan on dealing negative damage?
Negative damage cant be dealt...its dealt as 0.0 damage.
 

I_RULE_YOU

New Member
Reaction score
34
Actually, when you set the damage to say, -50 on Immolation, each interval of it will actually Heal 50 damage each time. many spells can have negative damage............
 

Cloak_Master

Active Member
Reaction score
41
It's MUI now. Should be fixed. However, now there is a slight delay on the wave as opposed to the hammer (unfixable). Just makes it look more cintematic imo.
 

I_RULE_YOU

New Member
Reaction score
34
Works beautifully +++++++++++rep!!!!

Only thing strange is that the unit only goes as far as you place your target for, but I can put it as having to cast target at far distance in instructions for the spell :D

Theres a bit of confusement though, I need this spell to have 7 levels, but I don't want to mess with it because I'm not sure how to trigger this with multi levels, can you post what it would be please? You don't have to make another test map for this.
 

Cloak_Master

Active Member
Reaction score
41
A good way to fix the range problem is to just order the unit to a polar offset towards the direction your caster is facing and just let him die of natural (timer) causes. I think you'll need to change the generic expiration timer if you do that to like .7 seconds. For different levels, just detect the type of spell being cast and create different dummies. I might do this later if I have the time.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top