• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Spell] Unkillable Ability

Status
Not open for further replies.
Level 4
Joined
Jul 15, 2013
Messages
33
So I'm fully aware that a unit can be invulnerable, but what I'm trying to execute is the follow:

The unit can't be brought below a certain HP threshold(1%)

What I have right now sort of works but if the attack deals more than the unit's health than the unit dies. Essentially what I'm trying to recreate is Tryndamere's Ultimate from League of Legends, the unit that I'm creating gains bonus stats for missing health. Any thoughts or suggestions are appreciated.
 
It won't. Dds allows you to change damage output even before it deals damage to the unit
What did I do wrong here then?
  • Unkillable
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Unit-type of GDD_DamagedUnit) Equal to Hero
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_Damage - (Life of GDD_DamagedUnit)) Greater than 0.00
        • Then - Actions
          • Unit - Set life of GDD_DamagedUnit to 50.00
        • Else - Actions
 
You aren’t preventing the damage at all. Units also die when they have 0.405 hp not 0 so you need to use that number in your check.

If (HP - Damage) < 0.406 then
Set Damage = 0.00
Set HP = 50.00

I'm just a little confused for the event part on what exactly is the real value and where do i declare it? As well as retrieving the values of the damage and health. Been a long time since I've touched editor so still a little rusty on things. Here's what i have so far:

Unkillable
Events
Game - Real_Test becomes Equal to 1.00
Conditions
(Unit_DwarvenBerserker has buff Rage of Storms ) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Int_Health_Test - Int_Damage_Test) Less than 1
Then - Actions
Set Int_Damage_Test = 0
Unit - Set life of Unit_DwarvenBerserker to 1.00%
Else - Actions
 
Why not modify my resource Bone Armor's to suit your needs?
Though it uses Bribe's Damage Engine you can reach the same result by adding in the condition to check the unit's current life.

I'm not familiar with how GDD works since I lasted used it but if I recall correctly it doesn't protect unit's below a the damage threshold, this is usually done by giving the damaged unit in question a massive health bonus temporarily and then removing it after the damage has been dealt.
 
Very close, tydieguy, just need to use the variables from the damage engine you're using. Also: How To Post Your Trigger
  • Unkillable
    • Events
      • Game - GDD_Event becomes Equal to 1.00
    • Conditions
      • (GDD_DamagedUnit has buff Rage of Storms ) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_Damage - (Life of GDD_DamagedUnit)) Greater than 1
        • Then - Actions
          • Set GDD_Damage = 0
          • Unit - Set life of GDD_DamagedUnit to 1.00%
        • Else - Actions
Setting the damage variable to 0 usually prevents the damage when using a DDS. I know it does explicitly in PDD, I assume GDD does too. If not you can switch up the system you're using and all you'll have to change are the variables to use the PDD_ ones instead of GDD_ ones.
 
Very close, tydieguy, just need to use the variables from the damage engine you're using. Also: How To Post Your Trigger
  • Unkillable
    • Events
      • Game - GDD_Event becomes Equal to 1.00
    • Conditions
      • (GDD_DamagedUnit has buff Rage of Storms ) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_Damage - (Life of GDD_DamagedUnit)) Greater than 1
        • Then - Actions
          • Set GDD_Damage = 0
          • Unit - Set life of GDD_DamagedUnit to 1.00%
        • Else - Actions
Setting the damage variable to 0 usually prevents the damage when using a DDS. I know it does explicitly in PDD, I assume GDD does too. If not you can switch up the system you're using and all you'll have to change are the variables to use the PDD_ ones instead of GDD_ ones.

Am I supposed to use a DDS that someone else has made and just implement for my map? That's prob why I'm confused, my map currently does not have one, and are you able to recommend a good one?
 
  • Unkillable
    • Events
      • Game - PDD_damageEventTrigger becomes Equal to 1.00
    • Conditions
      • (PDD_target has buff Rage of Storms ) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (PDD_amount - (Life of PDD_target)) Greater than 1.00
        • Then - Actions
          • Set PDD_amount = 0.00
          • Unit - Set life of PDD_source to 1.00%
        • Else - Actions
Pretty sure I got right, I have the DamageEvent script and all the variables, looked like it might of been cause amount of damage unit was taking? But not entirely sure.
 
No I made an error when I posted before. It should be: (Life - PDD_amount) < 1.00, not (PDD_amount - Life) > 1.00. The way it's written now if your attack exactly kills the caster (no more than 1 point of damage more than its health) then the regen will not occur.
Well the goods news is that it does work, the bad news is that every single unit has a disease cloud ability for some reason?, and my hero was gaining the ability of an enemy unit(which was not on map at time) as well for brief moments.

UPDATE: So for some reason the PDD system was using the custom disease cloud skill i had and just applied it to every single building and unit, I just coped the skill and deleted the old one. However though, it seems like when the trigger is executed it gives the hero an ability that does not belong to him, when i tried doing the same thing it fixed it but any enemies that were attacking got their HP brought down to 1% when the trigger went off.. as well as a SFX went off after ability finished which is not in my code..
 
Last edited:
Did you do the set up and configuration of PDD? It probably asks you to give rawcodes for a runed bracers ability and a defend ability, and my guess is that the default rawcodes for these abilities were for the disease cloud and something else in your map. Read over the documentation and the configuration to make sure you did it all. And if you did and it's still making disease clouds, then I suggest you upload your map here for people to look at (might be easier to diagnose this way).
 
Did you do the set up and configuration of PDD? It probably asks you to give rawcodes for a runed bracers ability and a defend ability, and my guess is that the default rawcodes for these abilities were for the disease cloud and something else in your map. Read over the documentation and the configuration to make sure you did it all. And if you did and it's still making disease clouds, then I suggest you upload your map here for people to look at (might be easier to diagnose this way).
Just fixed that, works now thank you so much!!
 
Status
Not open for further replies.
Back
Top