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

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top