• 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.

A revive system gone wrong

Status
Not open for further replies.
Level 3
Joined
Jun 7, 2011
Messages
59
Long story short, i made a hero revive trigger, and made sure it's MUI. However, in testing, it turned out to loose the later respawns if there are more than one person currently respawning. These are my latest ones, and I really can't find what's wrong with them.

  • Unit Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set ST_Respawn_Count = (ST_Respawn_Count + 1)
      • Set ST_Respawn_Skip = (ST_Respawn_Skip + 1)
      • Set ST_Respawn_Unit[ST_Respawn_Count] = (Dying unit)
      • Set ST_Respawn_Timer[ST_Respawn_Count] = (6.25 x (1.25 x (Real((Hero level of ST_Respawn_Unit[ST_Respawn_Count])))))
      • Set ST_Respawn_Off[ST_Respawn_Count] = True
      • Trigger - Turn on The Timer Part <gen>
  • The Timer Part
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer ST_Respawn) from 1 to ST_Respawn_Count, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ST_Respawn_Off[ST_Respawn] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ST_Respawn_Timer[ST_Respawn] Less than or equal to 0.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (ST_Respawn_Unit[ST_Respawn] belongs to an ally of Player 1 (Red)) Equal to True
                    • Then - Actions
                      • Hero - Instantly revive ST_Respawn_Unit[ST_Respawn] at (Center of Left Spawn <gen>), Show revival graphics
                      • Set ST_Respawn_Skip = (ST_Respawn_Skip - 1)
                      • Set ST_Respawn_Off[ST_Respawn] = False
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ST_Respawn_Skip Less than or equal to 0
                        • Then - Actions
                          • Set ST_Respawn_Count = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
                      • Hero - Instantly revive ST_Respawn_Unit[ST_Respawn] at (Center of Right Spawn <gen>), Show revival graphics
                      • Set ST_Respawn_Skip = (ST_Respawn_Skip - 1)
                      • Set ST_Respawn_Off[ST_Respawn] = False
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ST_Respawn_Skip Less than or equal to 0
                        • Then - Actions
                          • Set ST_Respawn_Count = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                • Else - Actions
                  • Set ST_Respawn_Timer[ST_Respawn] = (ST_Respawn_Timer[ST_Respawn] - 0.10)
            • Else - Actions
 
Status
Not open for further replies.
Top