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

Customizing a simple spell

Status
Not open for further replies.
Level 3
Joined
Nov 28, 2009
Messages
47
I am going to use one of my simplest spells from my map called "Rejuvination" so that you might be able to explain a simple solution to me.

My problem is that i want to make my "Rejuvination" spell heal a certain amount of HP according to a percentage of my units Agility/Strength/Intellegence depending on which i choose. How would i be able to do this because i feel that this is a much better idea compared to upgrading the spell over and over again.

I apreciate the help :)
 
Level 4
Joined
Jan 9, 2010
Messages
89
It's not as simple as you think. If you want a spell to damage/heal according to stats it will require at least one trigger. What you want here, a heal over time will need three different triggers if you do them with hashtables.
 
Level 3
Joined
Oct 9, 2008
Messages
61
I think this will work I got no time to test it atm:

  • Rejuvination
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Rejuvenation
    • Actions
      • Set RejuUnits[RejuCount] = (Target unit of ability being cast)
      • Set RejuHeal[RejuCount] = ((Real((Intelligence of (Triggering unit) (Include bonuses)))) / 10.00)
      • Unit - Set the custom value of (Target unit of ability being cast) to RejuCount
      • Set RejuCount = (RejuCount + 1)
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + RejuHeal[(Custom value of (Target unit of ability being cast))])
 
Status
Not open for further replies.
Top