• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Transferring essence

Status
Not open for further replies.
Level 10
Joined
May 25, 2021
Messages
376
My idea is creating an ability for my spirit wolves (summoned by a custom ability) so that when they attack a unit their Summoner (hero) will be healed. The amount of hp being healed will depend on the damage of each attack they dealt by some percent.

(I'm not sure if my English is ok, it is not my mother tongue!)

Please help. Very appreciated!
 
Level 30
Joined
Aug 29, 2012
Messages
1,385
You'll need a damage detection of some sort, but you should be able to get some results with a very basic system like that:

  • Detect Units
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Transfer Essence <gen> the event (Unit - (Triggering unit) Takes damage)
  • Transfer Essence
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Damage source)) Equal to Spirit Wolf (Level 1)
        • Then - Actions
          • Unit - Set life of YourHero to ((Life of YourHero) + (Damage taken))
        • Else - Actions
Then you adapt it depending on your map. If there are preplaced units, you'll need to add them to the second trigger too, otherwise they won't be detected. If multiple heroes can have spirit wolves, you'll need an array of some sort to make sure the healing goes to the right player, etc.
 
Status
Not open for further replies.
Top