• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Respawning units

Status
Not open for further replies.
Level 7
Joined
Jun 1, 2009
Messages
305
First off i did use the search function and read thru a couple and it has left me totally confused. Im trying to get units to respawn and this is the first map im working on. atm they dont once they die they are gone.

I need it to ONLY affect npc. Not including buildings. Can anyone please help!
 
Level 7
Joined
Jun 1, 2009
Messages
305
well while i somewhat understand that i still cant find were most of these triggering thingys are.....oh well ill keep looking!

If someone knows how to do it can i just email you a copy of the map and you could set it up in probably like 5 seconds??

+rep for help
 
Level 11
Joined
Sep 12, 2008
Messages
657
If you still need it,

you can set ALL npc owners as 1-2 players, then do this:


  • revive system
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Player 10 (Light Blue)
      • (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Wait 5.00 seconds
      • Set Temppoint = (Position of (Dying unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
        • Then - Actions
          • Hero - Instantly revive (Dying unit) at Temppoint, Hide revival graphics
        • Else - Actions
          • Unit - Remove (Dying unit) from the game
          • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at Temppoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Temppoint)
 
Level 8
Joined
Apr 8, 2009
Messages
499
If you still need it,

you can set ALL npc owners as 1-2 players, then do this:


  • revive system
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Player 10 (Light Blue)
      • (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Wait 5.00 seconds
      • Set Temppoint = (Position of (Dying unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
        • Then - Actions
          • Hero - Instantly revive (Dying unit) at Temppoint, Hide revival graphics
        • Else - Actions
          • Unit - Remove (Dying unit) from the game
          • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at Temppoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Temppoint)

.....

just wondering, what'd happen when multipile units die at once? thats right! their points won't get saved induvidually!
and apart from that, why save the point where they die? wanna pull them towards a healing spot?


well the problem isnt me knowing what to do its me not being able to find the right triggers to use....

send me your map and i will implant the respawn triggers from here:

(I have them in my map aswell, 100% working.)
 
Level 8
Joined
Apr 8, 2009
Messages
499
ty animoi for helping quick ques5tion though how do i make it so it only respawns units and not buildings 2?
for Both triggers use a Boolean comparison:

in the first one, when picking units you add a condition:
  • ((Picked unit) is a building) Equal to False

In the Second:
  • ((Dying unit) is a building) Equal to False

or you could only place it in the second trigger, that'd also work ^^
 
Status
Not open for further replies.
Top