• 🏆 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!

Need Hero Revive System

Status
Not open for further replies.
Level 11
Joined
Mar 19, 2008
Messages
799
I'm in need of a hero revive system, which revives heroes to their teams base once they die after few seconds (the seconds will increase based on hero level). Also it needs revive clocks, you can only see your own teams clocks once they die. There is 2 teams, team 1 (Players 1-6) team (players 7-12), team 1 heroes respawn to Spot A and team 2 heros to Spot B.

I think thats it on nutshell hopefully someone has this system already made or can make it.

Thanks in advance (Will REP)
 
Level 11
Joined
Aug 1, 2009
Messages
714
How about create an array integer.
Then, create a trigger with an event of
  • Time - Every 1.00 seconds of game time
Then reduced the integer by 1 per second and if the integer reaches 0, revive the hero...

This are my triggers.
  • Events
    • Unit - A unit Is attacked
  • Conditions
  • Actions
    • Player Group - Pick every player in PG_DT and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GameStart Equal to True
        • Then - Actions
          • Player - Add 1 to (Picked player) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MultiB_DeathTimer[(Player number of (Picked player))] Greater than or equal to 1
        • Then - Actions
          • Set MultiB_DeathTimer[(Player number of (Picked player))] = (MultiB_DeathTimer[(Player number of (Picked player))] - 1)
          • Multiboard - Set the text for Multiboard item in column 3, row MultiB_Spots[(Player number of (Picked player))] to (String_Player_Color[(Player number of (Picked player))] + ((String(MultiB_DeathTimer[(Player number of (Picked player))])) + |r))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PlayerHero_Unit[(Player number of (Picked player))] is dead) Equal to True
              • MultiB_DeathTimer[(Player number of (Picked player))] Less than or equal to 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (PlayerHero_Unit[(Player number of (Picked player))] belongs to an ally of Player 6 (Orange)) Equal to True
                • Then - Actions
                  • Set CP = (Center of Mari Spawn Point Light <gen>)
                  • Hero - Instantly revive PlayerHero_Unit[(Player number of (Picked player))] at CP, Show revival graphics
                  • Custom script: call RemoveLocation (udg_CP)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (PlayerHero_Unit[(Player number of (Picked player))] belongs to an ally of Player 12 (Brown)) Equal to True
                • Then - Actions
                  • Set CP = (Center of Mari Spawn Point Dark <gen>)
                  • Hero - Instantly revive PlayerHero_Unit[(Player number of (Picked player))] at CP, Show revival graphics
                  • Custom script: call RemoveLocation (udg_CP)
                • Else - Actions
            • Else - Actions
          • Set MultiB_DeathTimer[(Player number of (Picked player))] = 0
          • Multiboard - Set the text for Multiboard item in column 3, row MultiB_Spots[(Player number of (Picked player))] to
  • Hero Custom Revive System
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Dying unit)) Equal to Player 1 (Red)
          • (Owner of (Dying unit)) Equal to Player 2 (Blue)
          • (Owner of (Dying unit)) Equal to Player 3 (Teal)
          • (Owner of (Dying unit)) Equal to Player 4 (Purple)
          • (Owner of (Dying unit)) Equal to Player 5 (Yellow)
          • (Owner of (Dying unit)) Equal to Player 6 (Orange)
          • (Owner of (Dying unit)) Equal to Player 7 (Green)
          • (Owner of (Dying unit)) Equal to Player 8 (Pink)
          • (Owner of (Dying unit)) Equal to Player 9 (Gray)
          • (Owner of (Dying unit)) Equal to Player 10 (Light Blue)
          • (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
          • (Owner of (Dying unit)) Equal to Player 12 (Brown)
      • (Owner of (Dying unit)) Not equal to Neutral Passive
      • (Owner of (Dying unit)) Not equal to Neutral Extra
      • (Owner of (Dying unit)) Not equal to Neutral Victim
      • (Owner of (Dying unit)) Not equal to Neutral Hostile
      • ((Dying unit) is in Dummy_Heroes) Equal to False
    • Actions
      • Set MultiB_DeathTimer[(Player number of (Owner of (Dying unit)))] = (3 x (Hero level of (Dying unit)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) belongs to an ally of Player 6 (Orange)) Equal to True
        • Then - Actions
          • Set MultiB_DeathTimer[6] = (MultiB_DeathTimer[6] + (3 x (Hero level of (Dying unit))))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Dying unit) belongs to an ally of Player 12 (Brown)) Equal to True
            • Then - Actions
              • Set MultiB_DeathTimer[12] = (MultiB_DeathTimer[12] + (3 x (Hero level of (Dying unit))))
            • Else - Actions
You must set your hero per player.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Did you test it in multiplayer? Because it does have two spawn locations. Try creating a footman at TempLoc in the hero revive trigger and you'll see. The paladin in the test map doesn't revive for some reason. I believe that is because it's owned by computer player.
 
Level 11
Joined
Mar 19, 2008
Messages
799
Did you test it in multiplayer? Because it does have two spawn locations. Try creating a footman at TempLoc in the hero revive trigger and you'll see. The paladin in the test map doesn't revive for some reason. I believe that is because it's owned by computer player.

Well i did test it on with computers, i believe its missing the respawn part for Team2, based on what i know about triggers, other than that, heros only spawn 1 time, if they die again they won't get back. It's all buggy.
 
Level 10
Joined
May 27, 2009
Messages
494
GUI eh?? perhaps i might help, but kinda hard if i'm gonna make this out of your map :p if you will gonna implement team clocks on multiboard but if you want player-only clocks, that can be easy copying without your map o_O
just pm me on ym if you want lololol

**out of topic. i'm not currently visiting gv nowadays, just finishing my map :D
 
Status
Not open for further replies.
Top