• 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.

Detect when the immolation ends with insufficient mana

Status
Not open for further replies.
Level 2
Joined
Apr 20, 2012
Messages
15
Good day,

I have a detonator that works when the "Unimmolation" command is sent, and removes a spell from the one that issues the order

I have another detonator that adds the spell when the immolation is launched.

What happens is that, after some time, when the mana is finished by immolation, I do not know how to detect that event.

It works if it is deactivated manually, but it does not work if the mana ends because of the own consumption of immolation.
 
One could add the caster to a constant group and check 3 to 5 times a second, if any unit of the group lost the buff in that case remove it from the group and the skill gained.

Other way is using the unit's mana becomes lower then 0.1 Event. Here you might have the problem of dynamicly create Events for units using that effect and to filter out oom of that unit when not using immolation. It also triggers for some wierd reason twice.
  • Unit - Demonhunter 0000 <gen>'s mana becomes Less than or equal to 0.10
 
Level 2
Joined
Apr 20, 2012
Messages
15
There is some way to detect when the unit loses the buff of the immolation?

Anyway, I'll try what you said.
 
Level 13
Joined
May 10, 2009
Messages
868
I'd like to complement Tasyen's second idea. This is really up to you.
  • Immolation learns
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Immolation
    • Actions
      • Trigger - Add to Immolation fires <gen> the event (Unit - (Triggering unit)'s mana becomes Less than 0.10)
      • Trigger - Add to Immolation fires <gen> the event (Unit - (Triggering unit) Is issued an order with no target)
  • Immolation fires
    • Events
    • Conditions
    • Actions
      • Custom script: local integer order = GetIssuedOrderId()
      • -------- If issued "unimmolation" or unit ran out of mana then --------
      • Custom script: if (order == 852178 or order == 0) then
      • Unit Group - Add (Triggering unit) to Immolation_Group
      • Countdown Timer - Start Immolation_Timer as a One-shot timer that will expire in 0.01 seconds
      • Custom script: endif
  • Immolation check
    • Events
      • Time - Immolation_Timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Immolation_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Immolation) Equal to False
            • Then - Actions
              • -------- Immolation has been turned off --------
              • -------- Do your stuff --------
            • Else - Actions
      • Unit Group - Remove all units from Immolation_Group
Do note that I'm not considering preplaced heroes with Immolation already learned, nor units in general. So, his first suggestion might be way friendlier when it comes to implementing it in your map.
 

Attachments

  • Unimmolation.w3x
    17.3 KB · Views: 49
  • Immolation Activation
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(immolation))
          • (Issued order) Equal to (Order(unimmolation))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(immolation))
        • Then - Actions
          • /* Activated for whatever reason */
        • Else - Actions
          • /* Deactivated for some reason, oom, death or player order */
If I'm right this works, I used it for some map I did a few month ago.
 
Level 13
Joined
May 10, 2009
Messages
868
The problem with that would be if a player attempts to "unimmolation" while a unit is stunned, and then right click or perform any other action last. The immolation will still be turned on, and the triggers will act as if it were off.
 
Level 2
Joined
Apr 20, 2012
Messages
15
Effectively, but it also does not detect when a unit runs out of mana and loses the effect.

The test map method (BloodSoul) seems interesting, but apparently I will need some time to understand it and play with it, since the skill I am using is not a hero, it is a unit. In addition multiple units are those that use that ability. Would it be possible to delve a little deeper into this method?

PS: Excuse my English
 
Level 8
Joined
Oct 4, 2016
Messages
210
has far as i know, immolation doesn't stack with multiple sources of the same ability.

For a solution, why not have a periodic trigger that checks if unit in a unit group has the Buff Immolation.
Add all units that activate the immolation to unit group.
 
Level 13
Joined
May 10, 2009
Messages
868
Well, if non-heroes have that ability, then Tasyen's first suggestion would be the best idea so far. If you were to use what I posted above, then you'd have to work with dynamic triggers by "recyclying" events, because dead units should be removed in order to no lag your game (lots of units in events). Unless you have few units in your map.

Anyway
  • Immolation cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Immolation
          • (Ability being cast) Equal to Immolation (Neutral Hostile)
    • Actions
      • -------- If group is empty, that means the "check" trigger is turned off. Turn it on. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Immolation_Counter Equal to 0
        • Then - Actions
          • Trigger - Turn on Immolation check <gen>
        • Else - Actions
      • -------- Add unit to the group --------
      • Unit Group - Add (Triggering unit) to Immolation_Group
  • Immolation check
    • -------- Initially off --------
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set Immolation_Counter = 0
      • Unit Group - Pick every unit in Immolation_Group and do (Actions)
        • Loop - Actions
          • Set Immolation_Unit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Immolation_Unit has buff Immolation) Equal to False
            • Then - Actions
              • Unit Group - Remove Immolation_Unit from Immolation_Group
              • -------- Unit turned immolation off, ran out of mana, or died. Remove it from the group, and do your stuff --------
            • Else - Actions
              • -------- This means Immolation_Unit still has Immolation buff; Increase counter var --------
              • Set Immolation_Counter = (Immolation_Counter + 1)
      • -------- No unit in group? Turn this trigger off --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Immolation_Counter Equal to 0
        • Then - Actions
          • Trigger - Turn off Immolation check <gen>
        • Else - Actions
 

Attachments

  • Unimmolation.w3x
    17.7 KB · Views: 36
Level 2
Joined
Apr 20, 2012
Messages
15
Great!
The last method works well, I worry if it will become inefficient when it has 100 units or more (within the group), anyway, I will use it.
A million thanks to everyone for their answers. Soon I will continue to consult you about other things !!! xD

PS: I also tried to use a "morph" skill, where the second unit had a negative mana regeneration. Actually what I was looking for is a skill like this: Cloak - Liquipedia - The StarCraft II Encyclopedia


TY to all!!!
 
Status
Not open for further replies.
Top