• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Using Hero Atributes for Spells

Status
Not open for further replies.
Level 1
Joined
Oct 25, 2014
Messages
3
Well.. im having troubles to make spells that heal/damage overtime a group of units .. i explain it:

When i made a spell that Damages or Heals over time a group of units, i don't know how to store the caster's intelligence on a hashtable or variable to load on another trigger with a periodic event..

I'm success when there's a single hero that casts that spell .. but when 2 o more heros cast the same spell, the variables overwrites themself and the spell doesn't work properly...

When i made spells, i made it a little bit different from typically spells...

See this:

  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • Loop: Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If: Conditions
            • ((Picked unit) has buff Healing Pulse ) Igual a True
          • Then: Actions
            • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real (HeroStat of(Hero) (Include bonuses)) / 10.00))
          • Others: Actions
            • Do nothing
HeroStat is a variable that stores the Hero Intelligence from the spell trigger.
And Hero is a variable that stores the Hero Unit from the spell trigger.


Usually i saw that ppl uses fixed values (depending on hero's skill lv) to damage/heal a unit with a spell, but i don't ...

I'd preffer to damage or heal a unit with the caster's stat (generally intelligence of hero, multiplied by the spell lv).

I do that because (for example) when a hero has 1.000 hp, and a spell damages him for 500, it's 50% of hero's hp .. but when that hero has 10.000hp, the same spell that previously take off 50% of his hp, now is taking only 5%

BUT .. if i use something like this:
For example: Damage a unit with (Real(intelligence of(triggering unit)/10))

As the Caster's gain more intelligente (by level, item, tomes, etc.) his spells becomes more powerfull (for heal, damage, etc.).

And i don't need to make a larger amount of skill levels.. u can make a spell with only 1 or 3 levels and make something like:

Damage a unit with (0.5*(Real(Intelligence of(triggering unit))))*(Real(Level of Ability for (Triggering Unit))


So .. can someone with more experience than me make an example of a Damage overtime spell that damages equal to caster's intelligence ??.

Well .. that's all.
Wish this info serve to make great spells to those ppl who don't know that we can use hero stats to damage or heal :)
 
Status
Not open for further replies.
Top