• 🏆 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!

[Solved] Summon health-damage based of hero.

Status
Not open for further replies.
Level 9
Joined
Dec 16, 2017
Messages
343
Hi guys,i want to make a spell for unholy death knight for my map that is just a simple ghoul summon, but i want to make the ghoul HP be based of my hero STR and the ghoul DMG to be based of my hero AGI, does anyone have any idea of how i can do that in GUI? Thanks !
 
Level 5
Joined
Jul 31, 2020
Messages
103
  • Ghoul
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Ghoul
    • Actions
      • Set VariableSet summoningHero = (Triggering unit)
      • Set VariableSet summonedGhoul = (Summoned unit)
      • -------- Max life --------
      • Unit - Set Max HP of summonedGhoul to (9999999 x (Unit: summoningHero's Integer Field: Strength (with Bonus) ('ustb')))
      • -------- Damage --------
      • -------- WC3 damage formula: --------
      • -------- MinDmg = Base + Dice --------
      • -------- MaxDmg = Base + Dice x Sides --------
      • Unit - Set Base Damage of summonedGhoul to (999 x (Unit: summoningHero's Integer Field: Agility (with Bonus) ('uagb'))) for weapon index: 0
      • Unit - Set Dice Number of summonedGhoul to (99 x (Unit: summoningHero's Integer Field: Agility (with Bonus) ('uagb'))) for weapon index: 0
      • Unit - Set Dice Sides of summonedGhoul to (9 x (Unit: summoningHero's Integer Field: Agility (with Bonus) ('uagb'))) for weapon index: 0
 
Oof, these triggers were introduced much later, your best bet now is to give the unit a hero inventory and give them modifed tomes of health and damage.
There's a better best then that for health, your probably right for damage, it'd likely be best to use powers of 2 or 1, 10, 100, 1000 if ones concerned with speed/object editor. Tome spam can lead to some issues, make sure to clean them up as well.
 
Status
Not open for further replies.
Top