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

Shear Ability

Status
Not open for further replies.
Level 5
Joined
Mar 26, 2004
Messages
53
I've been trying to figure out how to trigger a Shear-like ability for an Illidan hero. I was going to have it be a passive ability, such as "Gives a 15/30/45% chance to reduce max life of attacked target by 50% for x seconds" Any suggestions on how this can be done with GUI/MUI?
 
Last edited:
Level 9
Joined
Nov 4, 2007
Messages
931
Shouldn't be too difficult, event for the unit starting an attack, condition to check if he has learned the ability, then an if/then/else: if Random # between 1 and 100 less than or equal to 15 x Level of Shear, then: damage target - cause Attacking Unit to Damage Attacked Unit dealing 0.50 x Max Life of Attacked Unit (set a variable or this guy), use spell or chaos damage to make it so that armor doesn't affect it that much, then you can just do a Wait timer for x seconds, and set his life to 0.50 x Max Life of Unit + Current Health if its not dead.
 
Shouldn't be too difficult, event for the unit starting an attack, condition to check if he has learned the ability, then an if/then/else: if Random # between 1 and 100 less than or equal to 15 x Level of Shear, then: damage target - cause Attacking Unit to Damage Attacked Unit dealing 0.50 x Max Life of Attacked Unit (set a variable or this guy), use spell or chaos damage to make it so that armor doesn't affect it that much, then you can just do a Wait timer for x seconds, and set his life to 0.50 x Max Life of Unit + Current Health if its not dead.


I think you got it wrong, he wants to reduce the max hit points of the unit by 50% not damage him by 50% of his max hp.... I think he wants something like this.... MAXHP(before spell) = 100 then MAXHP(after spell) = 50...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Test this one. I set the duration to 10 seconds so it's faster to test.

Change this to "save 50 as..." to change the duration, also change the buff duration in object manager.
  • Hashtable - Save 10 as (Key timer) of (Key (Attacked unit)) in Shear_Hash
--Attachment removed--
 
Last edited:
Level 5
Joined
Mar 26, 2004
Messages
53
Thanks for the responses:

Is there any way to cause the Sheared unit to retain the percentage of life they were at before being sheared? Example: if a unit is at 67% health and gets sheared, now he would be at 67% of 50%. He takes some more damage during the debuff, leaving him at around 56% of his 50%. But when Shear wears off, his life returns to 56% of max health. That came out really confusing... but hopefully understandable.

I figured a number example might be helpful.
A footman has 420 max life and has taken 200 points of damage. So he is at 220.
When Sheared his life drops by 50%, meaning his max is now 210, but his actual health is 110. When Shear wears off he is back at 220/420.
 
Last edited:
Level 5
Joined
Mar 26, 2004
Messages
53
Thanks.

Problems I've noticed:
Sometimes when a hero dies he drops one of the life tomes. But I think I fixed that by making the items undroppable.
Edit: Did not fix problem.
Edit:Edit: Nevermind, I fixed it.

Thanks again, +Rep
 
Last edited:
Status
Not open for further replies.
Top