• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Hero Revival System

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Untitled Trigger 026
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Temp_Player = (Owner of (Triggering unit))
      • Set Temp_Player_Group = (Player group(Temp_Player))
      • Set Temp_Integer_Array[(Player number of Temp_Player)] = (10 x (Hero level of (Triggering unit)))
      • Set Temp_Unit_Aray[(Player number of Temp_Player)] = (Triggering unit)
      • Leaderboard - Create a leaderboard for Temp_Player_Group titled Revived In:
      • Leaderboard - Add Temp_Player to (Last created leaderboard) with label (Proper name of (Triggering unit)) and value Temp_Integer_Array[(Player number of (Owner of (Triggering unit)))]
      • Trigger - Turn on Untitled Trigger 028 <gen>
  • Untitled Trigger 028
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Temp_Integer_Array[(Integer A)] = (Temp_Integer_Array[(Integer A)] - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer_Array[(Integer A)] Greater than 0
            • Then - Actions
              • Leaderboard - Change the value for (Player((Integer A))) in (Leaderboard of (Player((Integer A)))) to Temp_Integer_Array[(Integer A)]
            • Else - Actions
              • Leaderboard - Destroy (Leaderboard of (Player((Integer A))))
              • Set Temp_Loc_1 = (Center of (Playable map area))
              • Hero - Instantly revive Temp_Unit_Aray[(Player number of (Player((Integer A))))] at Temp_Loc_1, Show revival graphics
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
Something like this. Oh and turn off the second trigger when no heroes are dead.
 
Status
Not open for further replies.
Top