Transferring essence

Status
Not open for further replies.
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!
 
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.
Back
Top