Detect Reincarnation?

PandaBear

New Member
Reaction score
3
Is it possible to detect the Reincarnation ability? (I mean the unit dies, not when it learns the Reincarnation ability)
 

Shura

New Member
Reaction score
45
I tried, and I couldn't figure out a way to detect it. So would you not be able to trigger the reincarnation so that you can detect when it fires?
 

jig7c

Stop reading me...-statement
Reaction score
123
you could:
Trigger:
  • Trigger 1
    • Events
      • A unit learns an ability
    • conditions
      • Learned ability equal to Reincarnation
    • Actions
      • Set ReincarnationUnitVariable = Triggering Unit
      • Turn on Checker <gen>


Trigger:
  • Checker
    • Events
      • Every 5 seconds of the game...
    • Conditions
      • Level of Ability for Reincarnation equal to or greater than 1
      • ReicarnationUnitVariable HP less than 1....
    • Actions
      • ...


did you try the Event - A unit dies...
 

Shura

New Member
Reaction score
45
When a unit dies that is going to be reincarnated, the event A Unit Dies does not fire.
 

Shura

New Member
Reaction score
45
Jig's idea will work, but it will run whenever the unit dies, whether or not reincarnation is going to revive the unit. You can fix that by making a trigger that turns off the checking trigger when the unit dies.
 

PandaBear

New Member
Reaction score
3
Yea. I was doing something very wrong :banghead: :banghead: :banghead:

I was using my old trigger, and it was referring to the "Triggering Unit" but since the event is "Every 1 second of game time" it wasn't working...

I created a spell that when the unit dies, the ground explodes, dealing damage to enemy units nearby and after 7 seconds it comes back to life. To solve the Reincarnation cooldown problem i just added a timer (the trigger starts the timer and turns itself off, when the timer expire the trigger will turn on again) :D

@Edit
Almost forgot to thank you guys for your help... Thanks!
 

Bogrim

y hello thar
Reaction score
154
It would be a lot smoother to use a damage detection event and then simply detect when the unit is dealt a killing blow. You can create an artificial cooldown in many ways to match the cooldown of Reincarnation, the complexity depending on the need for MUI.
 

canons200

New Member
Reaction score
50
i have some idea, but i don't whether it will work or not. any spell also need to cast, may also include reincarnation? so try to use a unit start the effect, ability being cast equal to reincarnation???
 

Bogrim

y hello thar
Reaction score
154
Ok, let me try and say this again:

This is trivial if you use the damage detection system linked above. For instance,

Trigger:
  • Reincarnation with damage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Life of GDD_DamagedUnit) Less than or equal to GDD_Damage
      • (Level of Reincarnation for GDD_DamagedUnit) Greater Than 0
      • (Level of Reincarnation Cooldown for GDD_DamagedUnit) Equal to 0
    • Actions
      • local unit u = udg_GDD_DamagedUnit
      • Set Temp_Point = Position of GDD_DamagedUnit
      • Set Temp_Group = Units in (Add Range of Ability) range of Temp_Point matching conditions (Add Conditions)
      • Unit Group - Pick every unit in Temp_Group and do Actions
        • Unit - Cause GDD_DamagedUnit to damage (Picked Unit), dealing (Damage Amount) damage of attack type Spells and damage type Normal
      • Unit - Add Reincarnation Cooldown to GDD_DamagedUnit
      • Custom Script: call DestroyGroup( udg_Temp_Group )
      • Custom Script: call RemoveLocation( udg_Temp_Point )
      • Wait (Your Spell's Cooldown) seconds
      • Custom Script: set Temp_Unit = u
      • Unit - Remove Reincarnation Cooldown from Temp_Unit
      • Custom Script: set u = null

"Reincarnation Cooldown" is a dummy ability which does nothing and shows no icon but prevents the trigger from firing again until the spell has cooled down. This is also MUI.
 

canons200

New Member
Reaction score
50
the ability on dummy is dummy, on hero is hero. So if dummy have reincarnation, that is on dummy only, some skill on dummy can't use on hero

example just like you want a passive mirrar image, you can't use mirrar image on dummy to do action because that in on dummy, what you can do is to make staff of illusion into unit ability and then add to dummy next order dummy to create illusion.

besides, reincarnation by default has cooldown. so why want to remove it and then add back later using wait (your spell cooldown) second?
 

Bogrim

y hello thar
Reaction score
154
besides, reincarnation by default has cooldown. so why want to remove it and then add back later using wait (your spell cooldown) second?
Because there's no condition that will check if a spell is on cooldown, so the trigger will fire every time the unit dies, even when Reincarnation isn't active.

To prevent that, you have to create a "fake cooldown", meaning a period of time which the trigger will not activate to get an effect identical to that of the real ability's cooldown. While there are other alternatives, like storing variables or using custom values, I prefer adding an ability as as a classification for the spell's cooldown status: While the unit has the "dummy ability", said ability will yield an integer value different from units that don't have the ability, therefore you can check if the timer (the wait action) is done and actually create a cooldown on the ability.
 
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