• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Insetting a math function in a trigger

Status
Not open for further replies.
Level 2
Joined
Jun 1, 2017
Messages
25
Hello i am trying to make my first damaging spell.
But i can't figure out how to put a formula like "((5*INT)+100)" where "Ok" is.

Capture.PNG
 
Level 7
Joined
Mar 10, 2013
Messages
366
Is "Ok" a variable? Most of the time, using arithmetics should help, since they give the power of using operators (+ - x and /)
 
Level 2
Joined
Jun 1, 2017
Messages
25
I'm totally lost, if any of you have the time could you upload a map with an example of the trigger in it?
 
Level 2
Joined
Jun 1, 2017
Messages
25
Can't seem to make the ability to do damage, what am i doing wrong?
 

Attachments

  • hilp.PNG
    hilp.PNG
    9.5 KB · Views: 37
Level 2
Joined
Jun 1, 2017
Messages
25
If 5x is changed into -5x and c is changed to something negative too, could it be made into a healing ability?
 

ISL

ISL

Level 14
Joined
Nov 7, 2014
Messages
242
Writing the whole calculation into just one spot may bring you some pain if you ever need to change it. Especially if your damage formula is extremely long.

Better separate them so they would look simple and come handier.
  • Set Damage = 50 // Basic damage
  • Set Damage = (Damage + (1.25*(Intelligence of Caster (Include bonuses))) // Intelligence Scaling
  • Set Damage = (Damage * 0.8) // Percentage scaling
  • Unit - Cause (Caster) to damage (Target) dealing (Damage) damage of attack type Spell and damage type Normal
 
Level 11
Joined
Jun 2, 2004
Messages
849
I sometimes convert a long calculation to a custom script to make updating easier.


Also negative values work fine with the damage trigger. However, if it's set to physical it will be subject to armor reduction.
 

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,296
If 5x is changed into -5x and c is changed to something negative too, could it be made into a healing ability?
No it will not make it a healing ability. Healing is done by modifying unit current health, adding the heal amount to it. An ability like Holy Light will not trigger damage events when healing, but will when damaging undead.

Set unit life to current unit life + heal amount. Heal amount can be your existing formula.
 
Status
Not open for further replies.
Top