Reincarnation Question

Darkchaoself

What is this i dont even
Reaction score
106
Simple- No, i dont believe in GUI

There might be someway using a hero is revived, if thats an event, but theres a slim chance

doing
Code:
Spell being cast equal to Reincarnation
might work, probably not though, considering its a passive.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
890
Not by conventional means, anyway.
This is because the hero never actually "dies", and you can't detect the use of the ability as far as I know.
However, I thought I once heard of a detection system for that....
Not sure, though.

Unless you're incredibly ambitious, I would say drop it.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
I remember someone else saying that you can.
If unit has 0 health, and is still alive, then it is reincarnating :D
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
It's kinda hard but possible but maybe not in the GUI.

When a unit with reincarnation "dies" (in lack of a better word) it will have 0 hp (but isn't truly dead). When a unit with reincarnation "dies" it fires the "Unit has less than 1 HP" even but NOT the "Unit Dies" event, a unit that doesn't have reincarnation fires both events.

A system that detects the Reincarnation Event needs 3 different events:
1. Unit get less than 1 HP
2. Unit Dies (this happen right after event 1 IF the unit doesn't have reincarnation)
3. Unit get more or equal to 1 HP (the unit is restored)

Good luck :)

>However, I thought I once heard of a detection system for that....
http://www.wc3jass.com/viewtopic.php?t=244
 

Darkchaoself

What is this i dont even
Reaction score
106
Code:
If *unitvariable* life equal to 0
*Unitvariable* is alive equal to true 
Then do- ******
Else do- ******

Maybe?
 

NapaHero

Back from the dead...
Reaction score
43
You mean:

Code:
Events
  <Unit>'s life becomes less than or equal to 0
Conditions
  Level of Reincarnation for <Unit> equal to 1
  Unit is alive equal to true
Actions
  My actions

Edit: Ughh. JASS no please xP
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
You can't have the "Unit is Alive" check in the same trigger as the "life becomes less than or equal to 0" event, the unit is marked as dead after that event happens.

Something like this may be a pretty good GUI hack:

Code:
Events
  <Unit>'s life becomes less than 1
Conditions
  Level of Reincarnation for <Unit> equal to 1
Actions
  Wait 0 Seconds
  If - Conditions
     Unit is alive equal to true
  Then - Actions
      Wait For Condition (Units HP is greater or equal to 1) check every 0 second
      ---- Your actions ----
Note: Free hand GUI, the actions are probably named something else.
It's far from perfect but it's as close as you will get without adding tons of complexity.
 
U

undrawing

Guest
In addition to what has already been said, if a unit with reincarnation is the last to "die" in a unit group, and it goes into the reincarnation phase before sprining back to life. A Boolean All Units In Unit Group Are Dead will return True.

You could essentially combine Boolean - All Units In Unit Group Are Dead with Integer - Level Of Ability For Unit to find out if a unit is Reincarnating. This won't take into account ability cooldown, however.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
A unit dies when it has 0.405 health or less. Never compare a unit's life to 0 to see if it's dead, use 0.405 instead. If it has more, it's "alive", if it has less, it's dead.

Not that this is truly related to the topic at hand, but you can detect to see if a unit has been removed from the map like so:
JASS:
function IsUnitRemoved takes unit U returns boolean
    return GetUnitTypeId(U) == 0
endfunction
 

Naminator

Coming Back To Life
Reaction score
76
So if you life's became less then or equal to 0.405, then you actions. That might work?
 

Psiblade94122

In need of sleep
Reaction score
138
actualy, isnt the shortest "wait" .2 seconds? (anything under makes it defult to .2 even if the trigger says something lower)
 

0zaru

Learning vJASS ;)
Reaction score
60
the shortest wait i think is 0.27 or something like that. And setting the value of the wait to less of the shortest value it defaults it to the shorter value
 
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