Reincarnation

Caedin88

New Member
Reaction score
1
If a unit dies and has reincarnation, the
Code:
Test
    Events
        Unit - A unit Dies
    Conditions
    Actions

event response doesn't work to reference them, is there any way I can have a dying unit with reincarnation be my event? I have tried the following to no avail...

Begins Casting an Ability
Starts the Effect of an Ability
Begins Channeling an Ability
Begins Reviving
 

Azlier

Old World Ghost
Reaction score
461
I had this problem before, trying to make a survival map with deer dropping meat on death and reviving... Anyways, the only fix I could find to this was (freehand)
Code:
Events- A unit dies.

Conditions- Or- Multiple Conditions
                      Unit Type of Triggering Unit equal to (unit here).

Actions- (Your actions)
            Wait (reincarnation wait time) game-time seconds
            Set tempPoint (Position of Triggering Unit)
            Create 1 (Unit Type of Triggering Unit at Point facing (Facing of Triggering Unit))
            Custom script: call RemoveLocation(udg_tempPoint)
 

Red_drake

New Member
Reaction score
4
couldnt u use the starts the effect of an ability reincarnation? i dont actually know im just throwing that out there
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
event response doesn't work to reference them, is there any way I can have a dying unit with reincarnation be my event? I have tried the following to no avail...

Begins Casting an Ability
Starts the Effect of an Ability
Begins Channeling an Ability
Begins Reviving

Too bad he already tried that
 

FireBladesX

Eating my wings!
Reaction score
123
You can check if they use the item Ankh of Reincarnation, it should work. You can give it limitless charges if desired.

That's what I do in my maps.
 

Caedin88

New Member
Reaction score
1
You can check if they use the item Ankh of Reincarnation, it should work. You can give it limitless charges if desired.

That's what I do in my maps.

Thanks for the advice, I wonder, normally when you do Event - A Unit dies you can reference the killing unit... How would I reference the killing unit using Event - A Unit uses an Item, just trying to convert my trigger over to accomodate using anhks instead of a unit dying. Thanks.
 

pongpong

Member
Reaction score
9
Last time i make a trigger that detects reincarnation. this is the triggers i made

Code:
detect
    Events
        Unit - A unit Dies
    Conditions
        (Level of Reincarnation for (Dying unit)) Greater than 0
        ((Dying unit) is an illusion) Equal to False
    Actions
        Set Die = (Dying unit)
        Trigger - Run Wait <gen> (ignoring conditions)
        Trigger - Turn off (This trigger)
Code:
Vengeance Copy
    Events
        Time - Every 0.35 seconds of game time
    Conditions
        (detect <gen> is on) Equal to True
    Actions
        Set VengeanceDetect = (Units owned by VengeanceOwner matching ((((Matching unit) is an illusion) Equal to False) and (((Level of Reincarnation for (Matching unit)) Greater than 0) and ((Life of (Matching unit)) Less than or equal to 0.00))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in VengeanceDetect) Greater than 0
            Then - Actions
                Unit Group - Pick every unit in VengeanceDetect and do (Actions)
                    Loop - Actions
                        Set VengeanceHero = (Picked unit)
                -------- your actions here --------
            Else - Actions
                Do nothing
        Custom script:   call DestroyGroup(udg_VengeanceDetect)
Code:
Wait
    Events
    Conditions
    Actions
        Wait until ((Life of Die) Greater than 0.00), checking every 0.10 seconds
        Trigger - Turn on detect <gen>

vengeance hero & die is unit variable
vengeance detect is unit group variable
vengeance owner is owner of learning hero (learn reincarnation spell)

I make it this way to avoid detect dying illusions. Hope it helps.
 

Caedin88

New Member
Reaction score
1
> reference the killing unit

Don't think it's possible. That's why you need a revive trigger.

Alas I have been unable to create one that works with a wait. I have no clue as to why. I've even used local variables and copied Ryoko's Hero Revival system exactly without any change and applied it to my map but nothing works.

Code:
Revive Hero
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Custom script:   local timerdialog WINDOW
        Custom script:   local integer HEROWAIT
        Custom script:   local timer OURTIMER
        Custom script:   local unit OURHERO
        Custom script:   set OURHERO = GetDyingUnit()
        Custom script:   set HEROWAIT = ( GetHeroLevel(OURHERO) * 5 )
        Custom script:   set OURTIMER = CreateTimer()
        Custom script:   call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
        Custom script:   call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)) )
        Custom script:   set WINDOW = GetLastCreatedTimerDialogBJ()
        Custom script:   call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
        Custom script:   call PolledWait( HEROWAIT )
        Custom script:   call ReviveHeroLoc(OURHERO, GetRectCenter(GetPlayableMapRect()), true )
        Custom script:   call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
        Custom script:   call DestroyTimerDialog(WINDOW)
 

Caedin88

New Member
Reaction score
1
Last time i make a trigger that detects reincarnation. this is the triggers i made

Code:
detect
    Events
        Unit - A unit Dies
    Conditions
        (Level of Reincarnation for (Dying unit)) Greater than 0
        ((Dying unit) is an illusion) Equal to False
    Actions
        Set Die = (Dying unit)
        Trigger - Run Wait <gen> (ignoring conditions)
        Trigger - Turn off (This trigger)
Code:
Vengeance Copy
    Events
        Time - Every 0.35 seconds of game time
    Conditions
        (detect <gen> is on) Equal to True
    Actions
        Set VengeanceDetect = (Units owned by VengeanceOwner matching ((((Matching unit) is an illusion) Equal to False) and (((Level of Reincarnation for (Matching unit)) Greater than 0) and ((Life of (Matching unit)) Less than or equal to 0.00))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in VengeanceDetect) Greater than 0
            Then - Actions
                Unit Group - Pick every unit in VengeanceDetect and do (Actions)
                    Loop - Actions
                        Set VengeanceHero = (Picked unit)
                -------- your actions here --------
            Else - Actions
                Do nothing
        Custom script:   call DestroyGroup(udg_VengeanceDetect)
Code:
Wait
    Events
    Conditions
    Actions
        Wait until ((Life of Die) Greater than 0.00), checking every 0.10 seconds
        Trigger - Turn on detect <gen>

vengeance hero & die is unit variable
vengeance detect is unit group variable
vengeance owner is owner of learning hero (learn reincarnation spell)

I make it this way to avoid detect dying illusions. Hope it helps.

Unfortunatly I need to be able to detect this on multiple units at a time so the line Set Die = GetDyingUnit() cannot be a global variable it must be local, and thus I cannot use it in the other triggers unless it is some how passed, but my knowledge of JASS isn't high enough to do that, even if it is possible.
 

vypur85

Hibernate
Reaction score
803
Problems for revive triggers are usually (Troubleshoot them yourself):

- The creep do not create corpse after death (this can be set in Object Editor 'Does decay and ...'

- You removed the units in another trigger (Event: A unit dies; Action: Remove (Triggering unit))

- The decay time in gameplay constant (creeps decay time) is below your wait value in your revive trigger

- You set your (Triggering/Dying unit) into a global variable

The above opinions are all most probably for units, not heroes. In terms of heroes, I'm not sure why your trigger doesn't work. I've tried your trigger and it did worked for me (in your other thread). Are you creating revive trigger for heroes or creeps? Because I see you mentioned both creeps and heroes in your thread, so it's quite confusing.
 

Caedin88

New Member
Reaction score
1
Problems for revive triggers are usually (Troubleshoot them yourself):

- The creep do not create corpse after death (this can be set in Object Editor 'Does decay and ...'

- You removed the units in another trigger (Event: A unit dies; Action: Remove (Triggering unit))

- The decay time in gameplay constant (creeps decay time) is below your wait value in your revive trigger

- You set your (Triggering/Dying unit) into a global variable

The above opinions are all most probably for units, not heroes. In terms of heroes, I'm not sure why your trigger doesn't work. I've tried your trigger and it did worked for me (in your other thread). Are you creating revive trigger for heroes or creeps? Because I see you mentioned both creeps and heroes in your thread, so it's quite confusing.

Sorry for the confusion, when testing I was only testing on heroes. I had a trigger that counted all the heroes in the playable map and gave me the number, then another trigger that killed all heroes in the playable map, I then waited for the respawn trigger to work and then counted the heroes again, always at a loss. And visibly I could see only about half the heroes had revived... Worth noting is that all the heroes that respawned decayed normally, the ghost flew away or w/e but the other ones didn't seem to have a ghost, the unit just seemed to disappear after dying.

Any way, ive bee able to make Reincarnation work as a respawn mechanism for my map by selecting all units within 1000 of the dying unit that are enemies with the dying unit, then awarding those units exp / gold. Its not really the best system but it will have to do.

If you would like I could post my map and you can see what happens yourself with the respawn trigger.
 

DiFm

New Member
Reaction score
35
I had this really annoying problem when i tried to make a revivng skill that only revived 50% of the hp.

i Used units life is less then 1 to get it.

Reviving wont work since it's talking about reviving through tsavern.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top