• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[General] Idea: How to make channeled healing?

Status
Not open for further replies.
Level 15
Joined
Mar 25, 2016
Messages
1,327
You want a similar behaviour as life drain, just as a heal?

Use life drain that does not drain life, but transfer life, so that allies can be targeted. Set the drain interval greater than duration, so no actual drain happens.

Use triggers to keep track of start/end of channeling and heal the target.

You can also use the buffs to keep track of healing.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
I expected this question to come. Life drain is a bit weird in that regard. From what I recall you need to change the game data set to latest patch.

Another solution is to change gameplay constants:
Gameplay - Drain Transfers Life: change from true to true

Yes, you need to change it from true to true. It must be pink after that.
 
Last edited:
Level 15
Joined
Mar 25, 2016
Messages
1,327
I just edited my post with another solution. It's a bit weird but it works.

Under scenario -> map options you can change the game data set.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
Yes it needs to be pink. Pink values are overriden. This means that your values will be chosen. If you change game data set you have a different patch. Different patches have often times different values, but if a value is pink it means your value will be used.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
Drain Life(Target) to the target and Drain Life(Caster) to the target as you are only drain life and no mana.

The easy solution would be to check in a periodic trigger, which unit has the buff Drain Life(Target). This is bad because of a few reasons:
it is not efficient
you need to create different buffs, if you want to suppoert multiple levels of the spell
healing does not stack (don't know if you want it to stack)

The better solution would be to use the event starts the effect of an ability to add the targeted unit to a group or array and only check for these units.

Do you want it to stack? (two casters healing the same unit)
Do you need levels?
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
Then I would recommend using the array.

I have triggers in my map that do similar things, so I can show you how I did it.


  • Demon Grip Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Etheral Chains
    • Actions
      • Set DG_Index = (DG_Index + 1)
      • Set DG_Level[DG_Index] = Level of ability for casting unit
      • Set DG_Unit[DG_Index] = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DG_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Demon Grip Tick <gen>
        • Else - Actions
  • Demon Grip Tick
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer DG_Loop) from 1 to DG_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DG_Unit[DG_Loop] has buff Etheral Chains ) Equal to False
            • Then - Actions
              • Set DG_Level[DG_Loop] = DG_Level[DG_Index]
              • Set DG_Unit[DG_Loop] = DG_Unit[DG_Index]
              • Set DG_Index = (DG_Index - 1)
              • Set DG_Loop = (DG_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DG_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • -------- heal DG_Unit[DG_Loop] --------
              • -------- DG_Level[DG_Loop] is level of ability --------
 
Status
Not open for further replies.
Top