Skill similar to essence aura(dota) Help!

KooH

New Member
Reaction score
1
I'm trying to make a spell pretty much same as obsidian destroyer's skill called "essence aura" in dota. What it does is that whenever nearby ally hero casts a spell, they get some portion of mana back. I'm new and really don't know where to start! please help detail and will be appriciated :)
 

Avaleirra

Is back. Probably.
Reaction score
128
If you're brand new you may find this confusing but...

create an aura. Then make a trigger that detects when units cast a spell. Check if they have the buff and if they do give them 25% of their base mana.
 

Happysmiley

New Member
Reaction score
22
Create a trigger like this.

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Casting unit) has buff Youraurabuff) Equal to True
    • 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 20
        • Then - Actions
          • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + ((Max mana of (Casting unit)) x 0.25))
        • Else - Actions


This will give the unit a 20% chance to gain 25% of its max mana. Just change "(Random integer number between 1 and 100) Less than or equal to 20" to "....Less than or equal to X" where x is a number of your own preference to alter the chance of procc.
 

Carnerox

The one and only.
Reaction score
84
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Triggering Unit) has buff Youraurabuff) Equal to True
    • 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 20
        • Then - Actions
          • Unit - Set mana of (Triggering Unit) to ((Mana of (Triggering Unit)) + ((Max mana of (Triggering Unit)) x 0.25))
        • Else - Actions
Is better.
 

Slapshot136

Divide et impera
Reaction score
471
if you need it to be based off the mana cost of the spell, you would need a big array of each spell, a linked array with the mana cost of each spell, and then a loop to cycle through the array and find the matching mana cost of the cast spell.. or to simplify it: it's a big pain in the ass to do
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
if you need it to be based off the mana cost of the spell, you would need a big array of each spell, a linked array with the mana cost of each spell, and then a loop to cycle through the array and find the matching mana cost of the cast spell.. or to simplify it: it's a big pain in the ass to do
Or a Hashtable, though you'd still need to fill out all the mana costs by hand.

Or not do that at all: save the current mana of the unit upon spell effect, wait a moment (0 seconds on a timer is the shortest possible, and works well), then compare the unit's mana again.

To match the DotA ability, though, Happysmiley/Undead.Cow's trigger is correct.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top