Hero "soul" Revive problem

SNOOPDOGGDIZ

New Member
Reaction score
2
if anybody has played WoW you will understand where i am going with this..

i have hero's that get revived to a certain point when they die. which works
now my second step is that when they die a "soul" of there body appears at the reviving area and disappears when the hero is revived.
*i have a separate unit for the hero and the soul..

here is my trigger... i also have some other junk that happens too, just wondering how to make the "soul" disappear when the hero is revived


Pallie Death
Events
Unit - Paladin 0008 <gen>'s life becomes Less than 0.01
Conditions
Actions
Unit - Create 1 Paladin Soul for Player 1 (Red) at (Center of Region 000 <gen>) facing 0.00 degrees
Wait 2.00 seconds
Game - Display to (All players) for 30.00 seconds the text: Reviving Paladin...
Wait 30.00 seconds
Hero - Drop the item from slot 6 of Paladin 0008 <gen>
Unit - Remove (Last created unit) from the game
Hero - Instantly revive Paladin 0008 <gen> at (Center of Region 000 <gen>), Show revival graphics
Hero - Give Potion of Healing 0024 <gen> to Paladin 0008 <gen>
 

Emu.Man00

New Member
Reaction score
41
After
Code:
Unit - Create 1 Paladin Soul for Player 1 (Red) at (Center of Region 000 <gen>) facing 0.00 degrees
add a 32 second expiration timer.

Although I fail to see the point of the soul if he just revives after x seconds anyway o_O
 

SNOOPDOGGDIZ

New Member
Reaction score
2
After
Code:
Unit - Create 1 Paladin Soul for Player 1 (Red) at (Center of Region 000 <gen>) facing 0.00 degrees
add a 32 second expiration timer.

Although I fail to see the point of the soul if he just revives after x seconds anyway o_O

there is no point, just for total looks. i was thinking about a timer, i do know how to make them, i might..

the trigger i have works for 1 hero, but when you get for example all 4 dying at the same time, the "souls" dont die.. lol
 

SNOOPDOGGDIZ

New Member
Reaction score
2
Actions
Unit - Create 1 Paladin Soul for Player 1 (Red) at (Center of Region 000 <gen>) facing 0.00 degrees
Wait 2.00 seconds
Game - Display to (All players) for 30.00 seconds the text: Reviving Paladin...
Wait 30.00 seconds
Hero - Drop the item from slot 6 of Paladin 0008 <gen>
Unit - Remove (Last created unit) from the game
Hero - Instantly revive Paladin 0008 <gen> at (Center of Region 000 <gen>), Show revival graphics
Hero - Give Potion of Healing 0024 <gen> to Paladin 0008 <gen>

how can i make it so it removes the paladin not "last created unit"
because with this infect, it messes up when there is more then one "soul"
there are 4 heros that have a chance to all die at once
 

Emu.Man00

New Member
Reaction score
41
i was thinking about a timer, i do know how to make them, i might..
Just one line:
Code:
Unit - Add a 32.00 second Generic expiration timer to (Last created unit)

the trigger i have works for 1 hero, but when you get for example all 4 dying at the same time, the "souls" dont die.. lol
If you're using preplaced units why does it matter if its MUI?
 

_whelp

New Member
Reaction score
54
When the unit dies, hide the unit, don't remove it. Create the spirit, and when the interval of being dead is up, hide the spirit and revive the unit.
 

Genkora

Frog blast the vent core!
Reaction score
92
off topic, but you can right click the name of the trigger and select "copy as text" so that you don't have to write everything. and if you put wc3 tags around the code, it'll look like it does in the editor.
 

SNOOPDOGGDIZ

New Member
Reaction score
2
When the unit dies, hide the unit, don't remove it. Create the spirit, and when the interval of being dead is up, hide the spirit and revive the unit.


i think you might have something here.. just not really following your wording..

this is what i would like
you have a hero that is leveling. the hero dies..
a soul of the hero appears at the spawn place..
the hero is revived the hero spawns..
the soul of the hero then disappears..
 

SanKakU

Member
Reaction score
21
Pallie Death
Events
Unit - Paladin 0008 <gen>'s life becomes Less than 0.01
Conditions
Actions
Unit - Create 1 Paladin Soul for Player 1 (Red) at (Center of Region 000 <gen>) facing 0.00 degrees
Unit - Add a 32.00 second Generic expiration timer to (Last created unit)//this is just looking at your wait number of seconds commands below
Wait 2.00 seconds
Game - Display to (All players) for 30.00 seconds the text: Reviving Paladin...
Wait 30.00 seconds
Hero - Drop the item from slot 6 of Paladin 0008 <gen>
//this command is crap, take it out////Unit - Remove (Last created unit) from the game
Hero - Instantly revive Paladin 0008 <gen> at (Center of Region 000 <gen>), Show revival graphics
Hero - Give Potion of Healing 0024 <gen> to Paladin 0008 <gen>

you see while you're waiting for removing the last created units in that 32 seconds of waiting the other heroes may be dying and making new hero souls which only the last of will be the last created unit.
however...if you add the expiration timer immediately after creating the unit what that will do is tag the last created unit. so even creating new units the tag does not move to the newly created units...if you make the trigger have wait commands while you are waiting new units may be created and you'll encounter the problem you have.
i don't know if it's necessary but if you want you can make a trigger like if the soul dies you can revive the hero.

the main problem i see with this solution is that your soul may make some funny dying noises and/or dying animations at the end of the expiration timer...that doesn't happen with remove unit.

an alternative to this would be to make an array of a unit variable...and make each array unit number indicate the soul for each paladin...it could be a little tricky but if you only have one paladin per player it shouldn't be too hard. make the number correspond to the playerid...anyway then you can remove the unit specifically by the variable...

and by the way...you'll want to be making a variable for your center of region...
and removing that point. by the way...why wouldn't the soul be at the place of death of the paladin?
you can do GetUnitX and GetUnitY to get the x and y of the dying unit in this case the paladin and you can use those x and y to place the soul...

but yeah...that's right...you don't have to kill or remove the unit...

especially if you don't need the soul to be at the place of death...all you have to do is preplace the soul...and at the beginning of your map hide it. then when the paladin dies show his soul and then when he revives hide it again.

the Unit - Hide and Unit - Unhide actions should work for this. hidden units can't be attacked or whatever. i think you can't do absolutely anything to them as long as they're hidden, but i'm not entirely sure.

even without going with preplacing soul you can still tag a last created soul with a variable like with an array for a particulat number for that player id and then that variable can be used to hide and unhide the soul so that you don't keep trying to do stuff to last created unit.

but yeah it sounds like if your limit is indeed one paladin per player you would want to add if then conditions in your actions to check the owner of the dying paladin. then if it's like player 1 then you unhide and then hide the soul for player 1... like i say it's preplaced unit means it's in a variable automatically. so if you're not preplacing just create a variable for the unit. the only reason i would use the array is i can alter the number to be according to the player id but if that doesn't make sense to you it means i can pick the soul withoutt he if then checking for owning player thing. alternatively i guess you could pick souls of type belonging to player but that would create a player group leak that would need to be fixed i think...kinda like how you already have some location leaks that you haven't fixed...
 

Douxo

New Member
Reaction score
1
Short Answer

I would see more logic in simply creating a variable of unit. and having

Event - a unit dies
Condition - Unit type comparison - Paladin
Action
- Create 1 Ghost for (Player 1 Red) at ...etc
- Set Pal_Ghost = last created unit
- Wait 30 sec
- Revive Hero Instantly at centre of region 000gen
- Unit - Remove unit (Pal_Ghost)


I think this should work?
 

SNOOPDOGGDIZ

New Member
Reaction score
2
Pallie Death
Events
Unit - Paladin 0008 <gen>'s life becomes Less than 0.01
Conditions
Actions
Unit - Create 1 Paladin Soul for Player 1 (Red) at (Center of Region 000 <gen>) facing 0.00 degrees
Unit - Add a 32.00 second Generic expiration timer to (Last created unit)//this is just looking at your wait number of seconds commands below
Wait 2.00 seconds
Game - Display to (All players) for 30.00 seconds the text: Reviving Paladin...
Wait 30.00 seconds
Hero - Drop the item from slot 6 of Paladin 0008 <gen>
//this command is crap, take it out////Unit - Remove (Last created unit) from the game
Hero - Instantly revive Paladin 0008 <gen> at (Center of Region 000 <gen>), Show revival graphics
Hero - Give Potion of Healing 0024 <gen> to Paladin 0008 <gen>

you see while you're waiting for removing the last created units in that 32 seconds of waiting the other heroes may be dying and making new hero souls which only the last of will be the last created unit.
however...if you add the expiration timer immediately after creating the unit what that will do is tag the last created unit. so even creating new units the tag does not move to the newly created units...if you make the trigger have wait commands while you are waiting new units may be created and you'll encounter the problem you have.
i don't know if it's necessary but if you want you can make a trigger like if the soul dies you can revive the hero.

the main problem i see with this solution is that your soul may make some funny dying noises and/or dying animations at the end of the expiration timer...that doesn't happen with remove unit.

an alternative to this would be to make an array of a unit variable...and make each array unit number indicate the soul for each paladin...it could be a little tricky but if you only have one paladin per player it shouldn't be too hard. make the number correspond to the playerid...anyway then you can remove the unit specifically by the variable...

and by the way...you'll want to be making a variable for your center of region...
and removing that point. by the way...why wouldn't the soul be at the place of death of the paladin?
you can do GetUnitX and GetUnitY to get the x and y of the dying unit in this case the paladin and you can use those x and y to place the soul...

but yeah...that's right...you don't have to kill or remove the unit...

especially if you don't need the soul to be at the place of death...all you have to do is preplace the soul...and at the beginning of your map hide it. then when the paladin dies show his soul and then when he revives hide it again.

the Unit - Hide and Unit - Unhide actions should work for this. hidden units can't be attacked or whatever. i think you can't do absolutely anything to them as long as they're hidden, but i'm not entirely sure.

even without going with preplacing soul you can still tag a last created soul with a variable like with an array for a particulat number for that player id and then that variable can be used to hide and unhide the soul so that you don't keep trying to do stuff to last created unit.

but yeah it sounds like if your limit is indeed one paladin per player you would want to add if then conditions in your actions to check the owner of the dying paladin. then if it's like player 1 then you unhide and then hide the soul for player 1... like i say it's preplaced unit means it's in a variable automatically. so if you're not preplacing just create a variable for the unit. the only reason i would use the array is i can alter the number to be according to the player id but if that doesn't make sense to you it means i can pick the soul withoutt he if then checking for owning player thing. alternatively i guess you could pick souls of type belonging to player but that would create a player group leak that would need to be fixed i think...kinda like how you already have some location leaks that you haven't fixed...

I would see more logic in simply creating a variable of unit. and having

Event - a unit dies
Condition - Unit type comparison - Paladin
Action
- Create 1 Ghost for (Player 1 Red) at ...etc
- Set Pal_Ghost = last created unit
- Wait 30 sec
- Revive Hero Instantly at centre of region 000gen
- Unit - Remove unit (Pal_Ghost)


I think this should work?



thank you for your help the both of you, you really tried hard. but i am still having problems. could this be because i have reign of chaos world editor? i cannot figure out how to "hide" the units. :banghead: when i first started this project i thought this soul thing would have been super easy.. lol
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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