Pasive ability that only cast when hp is below 30%

streng

Member
Reaction score
1
Hi guys. I have a problem. I want to create ability based for example (berserker need to be only selfcasted) that is autocast only when hp is below 30%. Is any easy way base this spell to another spell that can do this? Or must create new spell triger? If i must create triger can anyone write it for me ? Thanks for you answer.
 

Solu9

You can change this now in User CP.
Reaction score
216
I would make a dummy unit which is created when your hero reaches 30% or less. The dummy unit has the Berserker spell and casts it on your hero.
 

NeosDany

Member
Reaction score
1
2 options:
1 trigger that runs every 0.1 seconds, checking monster hit points, if less than 30% create a dummy unit add bloodlust(or another skill) and cast it on unit, also turn off this trigger and turn on this trigger in 15 seconds(cooldown), also if the skill is used you can create special effects, or something else.
2 trigger similar to the another, but activated when your hero is target of spell or attack instead of 0.1 seconds...
 

ultimate11

Active Member
Reaction score
25
Simple,easy and reliable.No damage detection or advanced knowleadge.
have fun
Trigger:
  • Adding event
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Berserk
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Berserk for (Triggering unit)) Equal to 1
        • Then - Actions
          • Trigger - Add to Event <gen> the event (Unit - (Triggering unit)'s life becomes Less than or equal to (((Max life of (Triggering unit)) x 30.00) / 100.00))
        • Else - Actions

Trigger:
  • Event
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Berserk) Equal to False
          • (Level of Acid Bomb for (Triggering unit)) Greater than or equal to 1
        • Then - Actions
          • Set Temp_point = (Position of (Triggering unit))
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Temp_point facing Default building facing degrees
          • Unit - Add Berserk to (Last created unit)
          • Unit - Add a 0.40 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shadow Hunter - Berserk (Triggering unit)
          • Custom script: call RemoveLocation(udg_Temp_point)
        • Else - Actions
 

ultimate11

Active Member
Reaction score
25
Sry for double post,but I must to say this trigger will register the event with the value of life at the moment unit learned the skill.So in order to track max life and calculate the 30% u need to make more complex using period events and others stuff that u dont know.
To start with something easy is the best ideea.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
^You could have edited your post instead of making a new one.
 

Solu9

You can change this now in User CP.
Reaction score
216
I thought your spell idea was a good idea so I made one myself to use in my map.
My trigger looks like this:

Trigger:
  • Desperation
    • Events
    • Unit - A unit Is attacked
    • Conditions
    • And - All (Conditions) are true
    • Conditions
    • (Owner of (Attacking unit)) Equal to Player 12 (Brown)
    • ((Attacked unit) has buff Desperation ) Equal to True
    • ((Attacked unit) has buff Desperate) Equal to False
    • (Integer((Percentage life of (Attacked unit)))) Less than or equal to 30
    • Actions
    • Set Temp_Point1 = (Position of (Attacked unit))
    • Unit - Create 1 Desperation Dummy Unit for (Owner of (Attacked unit)) at Temp_Point1 facing Default building facing degrees
    • Unit - Order (Last created unit) to Human Priest - Inner Fire (Attacked unit)
    • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation (udg_Temp_Point1)


Desperation is a spell created based on Devotion Aura (could be any aura) where all data is set to 0. It has a custom buff called Desperation as well.

Desperate is the buff my Inner Fire based spell (the actual Desperation, which of course is casted by the dummy unit) gives the target. Again this is custom made for my spell.

Edit: The Inner Fire based Desperation has a duration of 5 seconds. And is reapplied every time an enemy attacks the hero if the hero do not already have Desperation active.
 

kingkwong92

Well-Known Member
Reaction score
25
Another way you could do it is have a passive ability that requires another unit in the techtree.
Have the passive ability, it will be blacked out as the requirements don't fit. A trigger that checks your health can create a dummy called "Under 30% HP" this makes the icon of the passive coloured and applies its effect. Also when the unit goes above 30% HP it loses the ability rather than getting below 30% and then healing up but still have the effects of the beserk.
 

streng

Member
Reaction score
1
Guys, Firstly thanks to your advices, but non triger worked for me. But when you read yours post, another idea occured to me. I write these trigerr
Code:
Time - Every 1.00 seconds of game time
Set TempUnitGroup1 = (Units in (Playable map area))
Unit Group - Pick every unit in TempUnitGroup1 and do (If ((((Picked unit) has buff Brilliance Aura) Equal to True) and ((Percentage life of (Picked unit)) Less than or equal to 50.00)) then do (Unit - Add Spell Book2  to (Picked unit)) else do (Unit - Remove Spell Book2  from (Picked unit)))
Custom script:  call DestroyGroup ( udg_TempUnitGroup )

Triger work perfectly for me, Hero has permanent aura, that checks your life, if life is under 50% triger add spelbook (inside spelbook is item that pasively increase attack speed)

But I want to made another similar spell. Based on devotion shield. I want to unit selfcast devotion shield if unit HP is under 30%, but when spell is casted set coldown to 300second
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top