Healing Wave as a Passive ability

Mapster

New Member
Reaction score
4
Ok i've tried making an ability where when a unit attacks it has a chance on casting an ability, a bit like Critical strike but without the damage.

I don't know how to get the wave effect from 1 unit to another unit but i used the Healing Effect instead, but i still want that effect if someone could help out. :D

Code:
Enters
    Events
        Unit - A unit enters (Playable map area)
    Conditions
    Actions
        Trigger - Add to Critical Strike <gen> the event (Unit - (Entering unit) Takes damage)
        Trigger - Add to Healing Light <gen> the event (Unit - (Entering unit) Takes damage)

Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Owner of (Damage source)) Not equal to Neutral Hostile
    Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Healing Light  for (Damage source)) Equal to 1
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Random integer number between 1 and 100) Less than or equal to 60
                    Then - Actions
                        Unit Group - Pick every unit in (Units within 512.00 of (Position of (Damage source))) and do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) belongs to an ally of (Owner of (Damage source))) Equal to True
                                    Then - Actions
                                        Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 100.00)
                                        Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Orc\HealingWave\HealingWaveTarget.mdl
                                    Else - Actions
                    Else - Actions
            Else - Actions
    Else - Actions

Thanks a lot if someone can help :)
 

Mapster

New Member
Reaction score
4
Ok i found the problem,
I didn't add this in

Code:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    Loop - Actions
        Trigger - Add to Healing Light <gen> the event (Unit - (Picked unit) Takes damage)

But i still need the effect of healing wave from 1 unit to another.

Thanks again
 

Baltazhar

Active Member
Reaction score
55
I'd make a dummy unit. When ever this ability occurs, it spawns one or more small dummy units with Healing Wave (without the actual healing), that just casts away... Perhaps just 1 dummy unit, and give it a Healing Wave that can target like 999, so all units that has been hit by the passive, will be hit by the wave.

Hope that helped a bit
- Baltazhar
 

Mapster

New Member
Reaction score
4
hmm, ok i tried to make one but it didn't work.
maybe the variables are stopping it but i think this work work without them?

Code:
Healing Light
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Damage source)) Not equal to Neutral Hostile
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Healing Light  for (Damage source)) Equal to 1
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Random integer number between 1 and 100) Less than or equal to 60
                            Then - Actions
                                Set UNIT = (Damage source)
                                Unit Group - Pick every unit in (Units within 512.00 of (Position of DamageSource)) and do (Actions)
                                    Loop - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                ((Triggering unit) belongs to an ally of (Owner of (Damage source))) Equal to False
                                                ((Picked unit) belongs to an ally of (Owner of (Damage source))) Equal to True
                                                (Percentage life of (Picked unit)) Less than 100.00
                                            Then - Actions
                                                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 100.00)
                                                Unit - Create 1 dummy healing wave for (Owner of DamageSource) at (Position of DamageSource) facing Default building facing degrees
                                                Set LastCreated_Unit = (Last created unit)
                                                Unit - Order LastCreated_Unit to Orc Shadow Hunter - Healing Wave DamageSource
                                                Wait 0.01 seconds
                                                Unit - Remove (Last created unit) from the game
                                            Else - Actions
                            Else - Actions
                    Else - Actions
            Else - Actions

I've never made a dummy unit before so... sorry?
 

swb90

New Member
Reaction score
7
Dummy - Just make a new unit and set model art to none and shadow to none. give it locust ability and invulnerability and the skill that you want it to cast. make sure the dummy has enough mana to cast the spell.

as for killing the unit after the casting, you can either give the dummy 2 hp with a -1hp regen so that it kills itself after 2 secs or you can use triggers to kill it. trigger-wise, look for the pros =) im not good with triggers.
 

Mapster

New Member
Reaction score
4
Thanks, i've got the dummy unit working but it's not casting the ability, i've duplicated Healing Wave and made it a non-hero ability but unticking "is hero ability" and tried using the code below but it doesn't work. :(

Code:
Then - Actions
    Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 100.00)
    Unit - Create 1 dummy healing wave for (Owner of (Damage source)) at (Position of (Damage source)) facing Default building facing degrees
    Set LastCreated_Unit = (Last created unit)
    Unit - Order LastCreated_Unit to Orc Shadow Hunter - Healing Wave (Random unit from (Units within 512.00 of (Position of (Damage source))))

Thanks again
 

cleeezzz

The Undead Ranger.
Reaction score
268
for dummy kill
use generic expiration timer set to 2 seconds


if you use a dummy to cast healing wave, i dont think you will need to use "add 100 hp to picked unit"

its not working?
check
- does your dummy have the ability Healing Wave (custom)
- Does your Custom ability consume 0 mana

Code:
custom script = set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 512.00 of (Position of (Damage source))) and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Picked unit)) Equal to (Owner of (Damage source))
            Then - Actions
                Unit Group - Add (Picked unit) to Heal Wave Group
                Unit - Order (unit)  to Orc Shadow Hunter - Healing Wave (Random unit from Heal Wave Group)
            Else - Actions

i think this prevents the hunter from using it on a enemy, which makes it fail
 

Mapster

New Member
Reaction score
4
Yeah i have done everything there but shouldn't i using something differently than

Code:
Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave (Random unit from HealingWaveGroup)

Last created unit?

I'm not too sure what to use instead.

EDIT:

Ok now it's creating 1 unit and then times it by 12 or something every time the ability is equal to 1.

Help would be greatful

Code:
Healing Light
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of living dummy healing wave units owned by (Owner of (Damage source))) Equal to 0
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Damage source)) Not equal to Neutral Hostile
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Healing Light  for (Damage source)) Equal to 1
                            Then - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Random integer number between 1 and 100) Less than or equal to 60
                                    Then - Actions
                                        Unit Group - Pick every unit in (Units within 512.00 of (Position of (Damage source))) and do (Actions)
                                            Loop - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        ((Triggering unit) belongs to an ally of (Owner of (Damage source))) Equal to False
                                                        ((Picked unit) belongs to an ally of (Owner of (Damage source))) Equal to True
                                                        (Percentage life of (Picked unit)) Less than 100.00
                                                    Then - Actions
                                                        Set UNIT = (Picked unit)
                                                        Unit Group - Add (Picked unit) to HealingWaveGroup
                                                        Unit - Create 1 dummy healing wave for (Owner of (Damage source)) at (Position of (Damage source)) facing Default building facing degrees
                                                        Wait 0.01 seconds
                                                        Unit - Order (Random unit from (Units owned by (Owner of (Damage source)) of type dummy healing wave)) to Orc Shadow Hunter - Healing Wave (Random unit from HealingWaveGroup)
                                                        Unit - Set life of UNIT to ((Life of (Picked unit)) + 100.00)
                                                    Else - Actions
                                    Else - Actions
                            Else - Actions
                    Else - Actions
            Else - Actions
 

cleeezzz

The Undead Ranger.
Reaction score
268
Set Hunter = Last created unit
(unit variable)

Unit - Order (Random unit from (Units owned by (Owner of (Damage source)) of type dummy healing wave)) to Orc Shadow Hunter - Healing Wave (Random unit from HealingWaveGroup)

why order a random unit of type dummy to do it?

you only created one, just order that one to do it.

>it creates 12 units

12.. dummies?
 

Mapster

New Member
Reaction score
4
It'll created 1 unit, then 3, then 6 , then 32 then 64 and so on... i dunno why =/
 

cleeezzz

The Undead Ranger.
Reaction score
268
add expiration timers to the created units

i don't see why it creates units like that. Have any other triggers that link to this? and how do you see them? they're supposed to be invisible. lol


make your dummy visible, unless it already is... and remove locust ability. then click on the unit (in-game after using the spell). See if the dummy even spawns.. if it does, click on it. check that it has the skill, then try manually using the skill on yourself. you might discover the problem this way
 

Mapster

New Member
Reaction score
4
The unit has the skilland it can be used but i do not know why the order isn't working

Code:
Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave (Random unit from HealingWaveGroup)

The skill has a 2 second cooldown, uses 0 mana and is in the second slot.

It was duplicated off a hero skill maybe thats why it won't work?

Also i duplicated a Peasant as the dummy unit.
 

wingdnosring

New Member
Reaction score
16
None of that should hold you back...here's the trigger you need for the dummy. I would recommend undoing all of the triggers that heal the units. I believe healing wave bounces like chain lightning, so your trigger might heal somebody that the spell effect doesn't bounce to. Sorry if I'm thinking of the wrong spell :p.

Code:
Unit - Create unit of type -your dummy unit- owned by player (Owner of (Casting Unit)) at -your point variable- facing default facing angle
Unit - Remove classification of Worker from last created unit
Unit - Add a 3.00 second expiration timer to (last created unit)
Unit - Add ability to last created unit
Unit - Set level of -dummy ability- to level of -passive ability-
Unit - Order last created unit to -healing wave order- random unit from group

Make sure the targets allowed and art effects are correct. Change cooldown to 0.01 and cast range to a high number like 2000. Set the mana cost to 0. Make sure the dummy unit has a high life regen and whatnot so that he won't die before the spell is cast. I don't use healing wave often but the spell duration fields might affect it. Make sure you specify an existing point and player when you create the unit. Set the 'attacks enabled' for the dummy unit to none.

That's all I can think of for now...if you still can't get it to work I'll look at it again.

[Edit]: I just looked over your trigger and noticed a few problems.

1. '(Number of living dummy healing wave units owned by (Owner of (Damage source))) Equal to 0': I'm not entirely sure what this does, it seems to stop this ability from working several times in a row. I would recommend removing it unless the unit that uses it attacks more than once in 0.4 seconds or its being used by several units at once.

2. This spell works when the person uses spells as well as his normal attack. By using the event 'A unit is attacked' and the condition '(Level of Healing Light for (Damage source)) Equal to 1' at the top instead of partway through the trigger, it will limit the trigger to only normal attacks.

3. '(Owner of (Damage source)) Not equal to Neutral Hostile': Again, I'm not entirely sure what this does. Unless this is a unit spell or a neutral hostile unit is able to use it, you can remove it. It all depends on the type of game you're making, but try to keep things as simple as possible. If it isn't necessary for the type of game you're creating, I would remove it.

4. Your unit group is set up to create as many dummy units as there are nearby allies. Try this:

Code:
Unit - Create unit of type -your dummy unit- owned by player (Owner of (Casting Unit)) at -your point variable- facing default facing angle
Unit - Remove classification of Worker from last created unit
Unit - Add a 3.00 second expiration timer to (last created unit)
Unit - Add ability to last created unit
Unit - Set level of -dummy ability- to level of -passive ability-
set HealingWaveGroup - Pick every unit in (Units within 512.00 matching condition ((Triggering unit) belongs to an ally of (Owner of (Damage source))) Equal to False and ((Picked unit) belongs to an ally of (Owner of (Damage source))) Equal to True and (Percentage life of (Picked unit)) Less than 100.00of (Position of (Damage source)))
Unit - Order last created unit to -healing wave order- random unit from HealingWaveGroup
 
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