1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  4. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Shear Ability

Discussion in 'Triggers & Scripts' started by Merry, Jan 27, 2010.

  1. Merry

    Merry

    Joined:
    Mar 26, 2004
    Messages:
    53
    Resources:
    0
    Resources:
    0
    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: Jan 27, 2010
  2. Darkness-4ever

    Darkness-4ever

    Joined:
    Nov 4, 2007
    Messages:
    763
    Resources:
    0
    Resources:
    0
    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.
     
  3. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23

    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...
     
  4. Justify

    Justify

    Joined:
    Mar 16, 2008
    Messages:
    935
    Resources:
    5
    Models:
    1
    Icons:
    1
    Spells:
    3
    Resources:
    5
    Reducing MAXLIFE not damaging the unit.
    Thats only possible with item abilities
    and will be a mess in GUI.
    Take a look at BonusMods, but care,
    it's vJass.
     
  5. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    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: Jan 28, 2010
  6. Merry

    Merry

    Joined:
    Mar 26, 2004
    Messages:
    53
    Resources:
    0
    Resources:
    0
    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: Jan 27, 2010
  7. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    It should work like that now.
     

    Attached Files:

  8. Merry

    Merry

    Joined:
    Mar 26, 2004
    Messages:
    53
    Resources:
    0
    Resources:
    0
    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: Jan 28, 2010