• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Requesting Respawn System [GUI]

Status
Not open for further replies.
Level 11
Joined
Aug 6, 2009
Messages
697
I'm requesting a respawn system for creeps (units).

I need it to be MUI.

When the unit dies I want it to have its own timer of 90 seconds and respawn
at the location it died at. I want this to work with multiple types of creeps not just one type of creep.

Creator of said system gets credit and rep.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Try this one....


First, set the unit that belongs to that unit for Revival:

  • Unut
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • -------- Neutral Hostile --------
      • Set Unit[1] = Toxic Spider
      • Set Unit[2] = Forest Wolf
      • Set Unit[3] = Gnoll
Second, do another trigger that sets up the revive:

  • respawn setup
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set Respawn_point[Respawn_count] = (Position of (Picked unit))
          • Unit - Set the custom value of (Picked unit) to Respawn_count
          • Set Respawn_count = (Respawn_count + 1)
Lastly, you do the trigger for the revival part:

  • Respawn for neutrail hostile creeps
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Unit[1]
          • (Unit-type of (Dying unit)) Equal to Unit[2]
          • (Unit-type of (Dying unit)) Equal to Unit[3]
    • Actions
      • Wait 90.00 seconds
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at Respawn_point[(Custom value of (Dying unit))] facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Dying unit))

You will always have to add the unit you create for the player in the first trigger so they will be included on the revival part. This is just an example of the trigger I have in my project, made by my friend.
 
Level 11
Joined
Aug 6, 2009
Messages
697
Sorry for double posting. Anyways, this didn't work at all.
  • Unit Group - Pick every unit in (Units owned by Player 5 (Yellow)) and do (Actions)
    • Loop - Actions
      • Set Respawn_Point[Respawn_Count] = (Position of (Picked unit))
      • Unit - Set the custom value of (Picked unit) to Respawn_Count
      • Set Respawn_Count = (Respawn_Count + 1)
  • CreepRespawn
    • Events
      • Unit - A unit owned by Player 5 (Yellow) Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[0]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[1]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[2]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[3]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[4]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[5]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[6]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[7]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[8]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[9]
        • Then - Actions
          • Wait 90.00 seconds
          • Unit - Create 1 (Unit-type of (Dying unit)) for Player 5 (Yellow) at Respawn_Point[Respawn_Count] facing Default building facing degrees
          • Unit - Set the custom value of (Dying unit) to (Custom value of (Last created unit))
        • Else - Actions
The units are set but it doesn't work. I don't believe this is MUI because of the wait.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Sorry for double posting. Anyways, this didn't work at all.
  • Unit Group - Pick every unit in (Units owned by Player 5 (Yellow)) and do (Actions)
    • Loop - Actions
      • Set Respawn_Point[Respawn_Count] = (Position of (Picked unit))
      • Unit - Set the custom value of (Picked unit) to Respawn_Count
      • Set Respawn_Count = (Respawn_Count + 1)
  • CreepRespawn
    • Events
      • Unit - A unit owned by Player 5 (Yellow) Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[0]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[1]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[2]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[3]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[4]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[5]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[6]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[7]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[8]
              • (Unit-type of (Dying unit)) Equal to RespawnUnit[9]
        • Then - Actions
          • Wait 90.00 seconds
          • Unit - Create 1 (Unit-type of (Dying unit)) for Player 5 (Yellow) at Respawn_Point[Respawn_Count] facing Default building facing degrees
          • Unit - Set the custom value of (Dying unit) to (Custom value of (Last created unit))
        • Else - Actions
The units are set but it doesn't work. I don't believe this is MUI because of the wait.

That is weird because it did work on mine. BTW did you do set the units for the revival. Also try not merging the two triggers.
 
Status
Not open for further replies.
Top