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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. 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.

Unable to die

Discussion in 'World Editor Help Zone' started by Paulus, Jul 31, 2014.

  1. Paulus

    Paulus

    Joined:
    Jan 17, 2014
    Messages:
    155
    Resources:
    0
    Resources:
    0
    Dear hivers,

    I want to make a cinematic when a unit is about to die. In the cinematic they do something. Just like in the warcraft series.
    The problem is, if i want to use a trigger for it i use the event:
    "Unit has less then 200hp". Because then it is out of reach for spells that do 199 dmg. But this leaves the unit with to much hp to feel defeated.
    Is there a way that a life of a unit doesn't go below 1?
    Or are there other ways of triggering?

    Thx
     
  2. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,476
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Damage absorption system. Detect fatal damage (since the event fires before damage is dealt so if current life - damage is less than 0.405 (some funny constant WC3 uses for death) then the unit will die and you can work on mitigation. Since it triggers a cinematic where health bars are invisible simply re-heal it to full life and do not care about that fraction of health it loses when damage is actually applied.
     
  3. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,702
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    However there might be abilities that deal more damage than max hp, it is safe to mitigate the damage instead.
     
  4. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,476
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    You can give the unit huge amounts of health temporarily to mitigate the damage.
     
  5. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,702
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    Or use the default specific unit damage detection, then add Invulnerability like Blizzard does.
     
  6. Paulus

    Paulus

    Joined:
    Jan 17, 2014
    Messages:
    155
    Resources:
    0
    Resources:
    0
    Thx +rep
     
  7. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,702
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    No problem, happy modding.