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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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