• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Calcualting % Health

Status
Not open for further replies.
Level 23
Joined
Oct 12, 2008
Messages
1,783
Heres the problem, I want a unit to cast a certain ability at low health like say 10%.

Problem is I realised that this does not take into account Handicaps/Upgrades which modify the units max hp.
Hence at high handicaps the spell is cast at higher health amounts than 10%.

So what I need to know is how can I make a trigger take into account health modifiers such as handicaps and upgrades.
 
Level 15
Joined
Oct 16, 2010
Messages
941
Heres the problem, I want a unit to cast a certain ability at low health like say 10%.

Problem is I realised that this does not take into account Handicaps/Upgrades which modify the units max hp.
Hence at high handicaps the spell is cast at higher health amounts than 10%.

So what I need to know is how can I make a trigger take into account health modifiers such as handicaps and upgrades.

I'm sure there's an easier way, but you could run a periodic that checks the health of the unit and if it's equal to 10% of the unit's health then manually order him to cast the ability.

GL
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
As far I as I know, health modifiers/upgrades/items/abilities DOESN'T effect Trigger
Trigger will interprets EXACTLY 10% of the unit's HP
Time Done: 7 minutes
 

Attachments

  • Cast Spell With or Without Handicap.w3x
    13.5 KB · Views: 43
Status
Not open for further replies.
Top