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.
  • 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