Hero dies ---> Respawn in beginning

Kebabnisse

New Member
Reaction score
1
Hello

I need help with hero spawn, when it dies it should spawn at the place i want. In my case the beginning.
It says that it will be revived at altar, but i want it to auto respawn after death at a certain place.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
This is probably something like you want:
Trigger:
  • Hero Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set TempPoint = (Center of (Playable map area))
      • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
      • Custom script: call RemoveLocation(udg_TempPoint)


Just change the "(Center of (Playable map area))" to wherever you want it to respawn...

And also, feel free to add a wait or something before the action, to make the revive dealy :D
 

Kebabnisse

New Member
Reaction score
1
This is probably something like you want:
Trigger:
  • Hero Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set TempPoint = (Center of (Playable map area))
      • Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
      • Custom script: call RemoveLocation(udg_TempPoint)


Just change the "(Center of (Playable map area))" to wherever you want it to respawn...

And also, feel free to add a wait or something before the action, to make the revive dealy :D

Dont you need a script for that?
the "custom script" thing, im a newbie on triggers etc so...
and where can i find the third thing? I can't find it:S
I've been wondering about that for some hours x|
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, the action is called "Custom Script", and there you can write words instead of pre-existing stuff... So just simple copy this to where it says "Script Code" in red:

call RemoveLocation(udg_TempPoint)

And for this you'll need a Point variable called TempPoint, and it's also case-sensitive so don't name it tempPoint or something ;)
 

Kebabnisse

New Member
Reaction score
1
Well, the action is called "Custom Script", and there you can write words instead of pre-existing stuff... So just simple copy this to where it says "Script Code" in red:

call RemoveLocation(udg_TempPoint)

And for this you'll need a Point variable called TempPoint, and it's also case-sensitive so don't name it tempPoint or something ;)

ok, thx.
I'll try it now. Hope it works;)
 

Kebabnisse

New Member
Reaction score
1
Trigger:
  • Hero respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Doom Guard 0040 <gen> is A Hero) Equal to True
    • Actions
      • Set TempPoint = (Center of START <gen>)
      • Hero - Instantly revive Doom Guard 0040 <gen> at (Center of START <gen>), Show revival graphics
      • Custom script: call RemoveLocation(udg_TempPoint)


Is this right? It says it dosnt work and it dosnt.
Have you tested it?
 

wc3ed

New Member
Reaction score
0
don't make it so hard on yourself, try this:

event - a unit dies (generic unit event)

condition - dying unit is an hero equal to true (boolean comp)

action - instantly revive (your hero) at (your region), hide/show revival grafics (Hero revive (instantly))

GL, ;)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
First, use Triggering unit instead of Dying unit :D

Second, your trigger leaks, which is why I have the custom script and the variable setting :D

Use my trigger for efficiency, use his trigger for easyness :D

But, as he said... You're not supposed to pick an actuall unit in that condition, but use Triggering unit :D
 

Kebabnisse

New Member
Reaction score
1
don't make it so hard on yourself, try this:

event - a unit dies (generic unit event)

condition - dying unit is an hero equal to true (boolean comp)

action - instantly revive (your hero) at (your region), hide/show revival grafics (Hero revive (instantly))

GL, ;)

It works now!
Thanks Very Very much dude!
:))))
 

Kebabnisse

New Member
Reaction score
1
First, use Triggering unit instead of Dying unit :D

Second, your trigger leaks, which is why I have the custom script and the variable setting :D

Use my trigger for efficiency, use his trigger for easyness :D

But, as he said... You're not supposed to pick an actuall unit in that condition, but use Triggering unit :D

well, im not so good at this so i go the easy way, thanks for the help anyway.
and if i would get any more problem i post again
 

wc3ed

New Member
Reaction score
0
First, use Triggering unit instead of Dying unit :D

Second, your trigger leaks, which is why I have the custom script and the variable setting :D

Use my trigger for efficiency, use his trigger for easyness :D

But, as he said... You're not supposed to pick an actuall unit in that condition, but use Triggering unit :D

first of all, he's a beginner so using costum script is way to difficult.. and i'd written that this is a EASY way.. right..
and second, using dying unit isn't a crime and it works.. :)

but you're right it leaks i've made it to quick, it has to be triggering unit or dying unit, srry for that..:D
 

Kebabnisse

New Member
Reaction score
1
ey guys i think i found another way to

Trigger:
  • Untitled Trigger 003
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Hero - Instantly revive (Dying unit) at (Center of START <gen>), Show revival graphics



this also works fine for me =)
I'm fooling around in the triggers to learn xP
 

wc3ed

New Member
Reaction score
0
ey guys i think i found another way to

Trigger:
  • Untitled Trigger 003
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Hero - Instantly revive (Dying unit) at (Center of START <gen>), Show revival graphics



this also works fine for me =)
I'm fooling around in the triggers to learn xP

what did you change?? this one?

Hero - Instantly revive (Dying unit) at (Center of START <gen>), Show revival graphics[/WC3]?

we already told you to do that, because that way you won't get a bug if some other hero dies.. look up :D
 

LoveRPG

Member
Reaction score
6
ey guys i think i found another way to

Trigger:
  • Untitled Trigger 003
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Hero - Instantly revive (Dying unit) at (Center of START &lt;gen&gt;), Show revival graphics



this also works fine for me =)
I'm fooling around in the triggers to learn xP

Though intstead of Dying unit, use triggering unit.
 

LoveRPG

Member
Reaction score
6
first, did not read all posts, someone got to write it before me.

Though a very important thing if you are having perhaps heros that are on the creep side. If u make the trigger only check if they are heros it will certainly respawn the Player 12(player 12 since neutrals cant respawn) at start. And it is probably a boss in that case. So add this condition:

Owner of triggering unit NOT equal to (Player 12)(Player comparison)

this way it wont respawn the player 12. Then to respawn bosses u need to make a new trigger for that.
 

TomTTT

New Member
Reaction score
44
and it's also case-sensitive so don't name it tempPoint or something ;)
Didn't you kind of confused him?
You don't have to set it EXACTLY to TempPoint, what you do have to make sure, is that in the custom script you write the exact name of the variable.

tempPoint
Trigger:
  • call RemoveLocation(udg_tempPoint)


SUPER_DUPER
Trigger:
  • call RemoveLocation(udg_SUPER_DUPER)
 

Squeekems

TH.net Regular
Reaction score
11
When writing these sort of triggers, it is best to be as broad as possible without leaking. Try to think of it as plain English.

Trigger:
  • Hero respawn
    • Events
      • Unit - A unit Dies //A unit dies.
    • Conditions
      • ((Triggering Unit) is A Hero) Equal to True //The unit who started this trigger is a hero.
    • Actions
      • Set TempPoint = (Center of START &lt;gen&gt;) //Because points can leak, it is best to clear them. The only way to clear them is to set them to a variable.
      • Hero - Instantly revive (Triggering Unit) at TempPoint, Show revival graphics //This is the only line in the actions that you would need to make this trigger work properly, but because we&#039;re trying to be efficient, we&#039;re going to use the variable.
      • Custom script: call RemoveLocation(udg_TempPoint) //This line clears the variable.


When I was a complete noob, I used this site, the World Editor Tutorials. This links you to a page that may be a little advanced for you, but it's no bad to get a look at. Tells you more about leaks.

Here's an example for why it is important to clear leaks:
Every second, every player gets one unit created for them. If there was no leak clearing system, can you imagine how hard it would be to remember all of that information? Every second, a twelve new leaks would be created. 12...24...36...48...60...72...etc. How long will that game map play before the game, or even the computer, crashes. Computers are powerful, but unless you've got an actual super computer, you'll be going at 1 FPS within 10 minutes.
 
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