Hero Revival System Ain't Workin'

D

danhel

Guest
Soo, whats the problem with this?

Code:
Die Blue Copy
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set Dead_Mortal_Hero[(Player number of (Owner of (Dying unit)))] = (Dying unit)
        Set Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] = (Position of (Dying unit))
        Unit - Create 1 Spirit (Mortal) for Player 1 (Red) at Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] facing Default building facing (270.0) degrees
        Unit - Order (Last created unit) to Move To Mortal_Revive_Point
        Rect - Center Human Revive <gen> on Mortal_Die_Point[(Player number of (Owner of (Dying unit)))]
        Trigger - Turn on wtf2 <gen>
 

Sim

Forum Administrator
Staff member
Reaction score
534
Nothing because you said the unit walks to the right spot.

The problem is the revive trigger - The other one.

Well it's not supposed to bug. Post it there.
 
D

danhel

Guest
Code:
wtf2
    Events
        Unit - A unit enters Human Revive <gen>
    Conditions
        (Unit-type of (Entering unit)) Equal to Spirit (Mortal)
    Actions
        Hero - Instantly revive Dead_Mortal_Hero[(Player number of (Owner of (Triggering unit)))] at Mortal_Revive_Point, Show revival graphics
        Trigger - Turn off (This trigger)

this is it
 

Sim

Forum Administrator
Staff member
Reaction score
534
Hero - Instantly revive Dead_Mortal_Hero[(Player number of (Owner of (Triggering unit)))] at Mortal_Revive_Point, Show revival graphics

This line is bugged because you revive a unit that didn't die. I'll explain.

A unit owned by player 2 (Blue) dies. You set Dead_Mortal_Hero as this unit, with the player number [2].

Then in the revive trigger you revive the unit Dead_Mortal_Hero[1] which has never been set, because in the other trigger you create a spirit for player 1 while the owner of entering unit in trigger #2 IS player 1, while we need to use Player number of Blue.

Create a spirit for Player 2 Blue in the first trigger, Not Player1 (Red) and everything will work out. If you don't want the player to be able to control the wisp just give it the locust ability in the object efitor.

Create a spirit for player 2 (Blue) and it will be ok trust me. Just give it the "Locust" ability to disable the player from controlling it around.
 
D

danhel

Guest
Ok, but instead of giving it to blue, why not give it to the same routine playernumber of blahblah (possible?) and it works with this 2 triggers or whaT?
 

Sim

Forum Administrator
Staff member
Reaction score
534
Just give it to blue, because the owner of the entering unit is Red.

Unless you revive Mortal_Dead_unit (whatever the anme of the dying hero) using Heor - Revive Mortal_Dead_Unit [2]

But you used Player number of owner of entering unit and that's the right way....

BUT

You must create a spirit for player 2 (blue)

Just do it man and it will work. Yes we use player number and it always work but in your special case (in my opinion useless but you can just give the spirit the locust ability and it won't be selectable) you cannot so you must change the spirit owner.

Change it to blue and add all spirits the Locust Ability.
 
D

danhel

Guest
K spirit has it, but now, at the reviving, i use revive dead_mortal_hero [2], and [3] in an other trigger? Its impossible in one trigger inst it?
 

Sim

Forum Administrator
Staff member
Reaction score
534
it is in one trigger. just make it so the unit created is owned by the same player as the one who controls the dying unit. If you do that, you will be able to use [(Player number of (Owner of (Entering unit))] in the second trigger.

And it will work for every player.
 
D

danhel

Guest
Code:
Die Blue Copy
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set Dead_Mortal_Hero[(Player number of (Owner of (Dying unit)))] = (Dying unit)
        Set Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] = (Position of (Dying unit))
        Unit - Create 1 Spirit (Mortal) for Player 1 (Red) at Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] facing Default building facing (270.0) degrees
        Unit - Order (Last created unit) to Move To Mortal_Revive_Point
        Rect - Center Human Revive <gen> on Mortal_Die_Point[(Player number of (Owner of (Dying unit)))]
        Trigger - Turn on wtf2 <gen>

Code:
wtf2
    Events
        Unit - A unit enters Human Revive <gen>
    Conditions
        (Unit-type of (Entering unit)) Equal to Spirit (Mortal)
    Actions
        Hero - Instantly revive Dead_Mortal_Hero[(Player number of (Owner of (Entering unit)))] at Mortal_Revive_Point, Show revival graphics
        Trigger - Turn off (This trigger)

Doesnt work
 

Sim

Forum Administrator
Staff member
Reaction score
534
Unit - Create 1 Spirit (Mortal) for Player 1 (Red) at Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] facing Default building facing (270.0) degrees

I....just...told...you...for...the...last...4+ post.. to

CHANGE

Player 1 (Red) for Player 2 (Blue)

Dude, read !!!
 
D

danhel

Guest
Sry i am always thinkink thats already done... these days im useless... to blue? not player onwing dying unit? or something like that?
 

Sim

Forum Administrator
Staff member
Reaction score
534
> not player onwing dying unit

Actually I'm being kind of idiot too. Yes, to Player owning Dying unit, not blue.
 
D

danhel

Guest
It woked for teal, but not for blue or yellot (cant test the rest, but if you ask i can)
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Unit - Order (Last created unit) to Move To Mortal_Revive_Point

Mortal_Revive_Point isn't an array with Player number of owner of dying unit...

So if more than 1 hero dies it will get confused. I don't know where you set your Mortal_Revive_Point, but unless it is the same for every player, try changing it.
 
D

danhel

Guest
Code:
Die Blue Copy
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set Mortal_Revive_Point[(Player number of (Owner of (Dying unit)))] = (Center of Human Revive <gen>)
        Set Dead_Mortal_Hero[(Player number of (Owner of (Dying unit)))] = (Dying unit)
        Set Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] = (Position of (Dying unit))
        Unit - Create 1 Spirit (Mortal) for (Owner of (Dying unit)) at Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] facing Default building facing (270.0) degrees
        Unit - Order (Last created unit) to Move To Mortal_Revive_Point[(Player number of (Owner of (Dying unit)))]
        Rect - Center Human Revive <gen> on Mortal_Die_Point[(Player number of (Owner of (Dying unit)))]
        Trigger - Turn on wtf2 <gen>


Code:
wtf2
    Events
        Unit - A unit enters Human Revive <gen>
    Conditions
        (Unit-type of (Entering unit)) Equal to Spirit (Mortal)
    Actions
        Hero - Instantly revive Dead_Mortal_Hero[(Player number of (Owner of (Entering unit)))] at Mortal_Revive_Point[(Player number of (Owner of (Entering unit)))], Show revival graphics
        Trigger - Turn off (This trigger)

This way? Lol teal worked again, but blue's ghost stopped, or moved to the middle...
 

Sim

Forum Administrator
Staff member
Reaction score
534
Now it bugs for another reason. The region is not even moved that you set Mortal_Revive_Point at the center of it. So, change the order like this :

Code:
Die Blue Copy
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] = (Position of (Dying unit))
        Rect - Center Human Revive <gen> on Mortal_Die_Point[(Player number of (Owner of (Dying unit)))]
        Set Mortal_Revive_Point[(Player number of (Owner of (Dying unit)))] = (Center of Human Revive <gen>)
        Set Dead_Mortal_Hero[(Player number of (Owner of (Dying unit)))] = (Dying unit)
        Unit - Create 1 Spirit (Mortal) for (Owner of (Dying unit)) at Mortal_Die_Point[(Player number of (Owner of (Dying unit)))] facing Default building facing (270.0) degrees
        Unit - Order (Last created unit) to Move To Mortal_Revive_Point[(Player number of (Owner of (Dying unit)))]
        Trigger - Turn on wtf2 <gen>


Like this and it should work.
 
D

danhel

Guest
EXACTLY the same that you posted, i checked it many many many times, belive me :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top