Hero Revival System Ain't Workin'

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 (Entering unit)))] at Mortal_Revive_Point[(Player number of (Owner of (Entering unit)))], Show revival graphics
        Trigger - Turn off (This trigger)
 

Sim

Forum Administrator
Staff member
Reaction score
534
Here's the prob. Mortal_Revive_Point is the same as Mortal_Die_Point lol.

And also, you create the ghost at the position of Revive_Point and order it to move at positon of _Die_Point.... which is the same point !

Well lemme think a bit.

EDIT: do you want the revive point at the same place as the die_Point ?

Gotta go to school. Will be back in 4 hours.
 
D

danhel

Guest
I will be in bed after 4 hours.

Nope. The revive place is in the base. I want the ghost move there, and revive the hero.

Tell me what to change then :)

Code:
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)))]

I think its fine. isnt it?
 

Sim

Forum Administrator
Staff member
Reaction score
534
I'm at school and comp sucks. Lol. Anyways...

Ok, above trigger will not work unless you set mortal_revive_Point as a non-array variable in the Human_Region.

Simply Remove the action "center Human_Region on mortal_die_revive" or something like that. Remove this action. Then, in the normal world editor when you see terrain and stuff, switch to region layer and move Human_Region to where you want your heroes to revive.

Next, remove the array from Mortal_Revive_Point and set it in the center of Human Region.

It's supposed to look 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))
        Set Mortal_Revive_Point[b][(Player number of (Owner of (Dying unit)))][/b] = (Center of Human Revive <gen>)

Remove the array from Mortal_Revive_Point, and set it once.

        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[b][(Player number of (Owner of (Dying unit)))][/b]

Once the array is removed the above action will work.

        Trigger - Turn on wtf2 <gen>

And in wtf2 everything should be ok.

Well that's it. If it's badly written it'S because the computers at school suck hard.
 
D

danhel

Guest
Doesn't work if more then 1 hero are dead.

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))
        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
        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)
 

Sim

Forum Administrator
Staff member
Reaction score
534
So it works if only 1 dies ? not bad.

Next, what happens if 2 die ?

"doesnt work" is not clear enough
 

Sim

Forum Administrator
Staff member
Reaction score
534
Well, it's supposed to work properly because it works independently of how many heroes are dead, except if 2 die at the same time (same second)

Check your other triggers. Maybe you have a unit leak remover going like :

A unit dies
wait x second
Remove triggering unit from the game
 
3

399288

Guest
about me... i got one trigger i made myself work.


event:
a unit owned by player 2(blue) dies

conditions:
triggering unit is a hero equal to true.

actions:
-start a (timer name) in oneshot that expired in (3.00 x (Real(Hero level)))seconds.
-create a timer window for last created timer.
-show the last created timer window for player 2 blue.
-wait (3.00 x (Real(Hero level)))seconds
-revive the hero instantly at player2 start location.



for hero level trigger..

event: a unit owned by player 2 gain a level.

condition: triggering unit is a hero equal to true.

action:
-set (P2LevelUp) = (P2LevelUp) +1




variable included:
P2LevelUp integer 1(default)



:) :) :) :) :)
 
D

danhel

Guest
Malto1 said:
Well, it's supposed to work properly because it works independently of how many heroes are dead, except if 2 die at the same time (same second)

Check your other triggers. Maybe you have a unit leak remover going like :

A unit dies
wait x second
Remove triggering unit from the game


Dont have thing such this. No ideas? Then i make separate triggers for all players? Wouldn't be a problem.
 

Sim

Forum Administrator
Staff member
Reaction score
534
I suggest you do it, yea. Separate triggers for each player and try it out.
 

Sim

Forum Administrator
Staff member
Reaction score
534
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))
        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
        Trigger - Turn on wtf2 <gen>

Well this trigger makes sure it is turned on everytime a hero die... Except if 2 die at the same time I think.

I didn't fully work with revival triggers as I used Ryoko's because I only need a normal revival trigger based on time :p

I should though.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Well this trigger makes sure it is turned on everytime a hero dies

Well, yes, but it's turned off when the first of those revives... so the second never gets a chance.
 
D

danhel

Guest
AceHart said:
> Well this trigger makes sure it is turned on everytime a hero dies

Well, yes, but it's turned off when the first of those revives... so the second never gets a chance.


Already thought of that, and deleted the wait things. Was worse.
 
D

danhel

Guest
Malto1 said:
I suggest you do it, yea. Separate triggers for each player and try it out.


What is the trigger should i clone? the wtf2 or the first one ? :)
 

Sim

Forum Administrator
Staff member
Reaction score
534
danhel said:
Doesn't work if more then 1 hero are dead.

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))
        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
        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)


Does it work if 2 heroes die in the game but have a reallllllly long time separating the deaths ?
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Technically, you can make it work, as long as you remove the spirit when it revives the hero, and you don't turn on/off the trigger.

Lmao after rereading 4920 times what you wrote I realize that turning on/off the triggers is useless. Because, anyways you only get a spirit when you are dead so the only way to activate the trigger is by entering the region with a spirit.

Also yea remove the spirit when it enter.

Good job Darth :D
 
D

danhel

Guest
Somehow, the spirits dont disappear, and dont even revive the heroes -.-.
And yea, everything is set perfectly, everything is there where it must be
 
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