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

Does "Revive Hero Instantly" work in Loops?

Status
Not open for further replies.
Level 11
Joined
Aug 6, 2009
Messages
697
The question is exactly what I said above,I am trying to make a MUI Revive system but it doesnt seem to revive the hero for some reason,o_O.Heres the triggers so far,(im new to MUI so if I did anything wrong please point it out).
I even made sure if the DyingUnit[TempIndex] was stored correctly and it was,i tested using the
  • Game - Display to (All players) the text: (Name of DyingUnit[TempIndex])
and it said Paladan,which was the hero I was using.
So I am wondering if the instantly revive function works in loops or IF/THEN/ELSE functions.


Loop Set Up
  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Dying unit) is A Hero) Equal to True
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Index Equal to 0
      • Then - Actions
        • Trigger - Turn on ReviveLoop <gen>
      • Else - Actions
    • Set Index = (Index + 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Index Greater than IndexMax
      • Then - Actions
        • Set IndexTemp[Index] = Index
        • Set IndexMax = Index
      • Else - Actions
    • Set TempIndex = IndexTemp[Index]
    • Set DyingUnit[TempIndex] = (Triggering unit)
    • Set Timer[TempIndex] = 10
The Loop
  • Events
    • Time - Every 1.00 seconds of game time
  • Actions
    • For each (Integer Loop) from 1 to Index, do (Actions)
      • Loop - Actions
        • Set TempIndex = IndexTemp[Loop]
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Timer[TempIndex] Greater than 0
          • Then - Actions
            • Set Timer[TempIndex] = (Timer[TempIndex] - 1)
            • Game - Display to (All players) the text: (String(Timer[TempIndex]))
          • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Timer[TempIndex] Equal to 0
      • Then - Actions
        • Hero - Instantly revive DyingUnit[TempIndex] at (Center of (Playable map area)), Hide revival graphics
        • Game - Display to (All players) the text: (Name of DyingUnit[TempIndex])
        • Set IndexTemp[Loop] = IndexTemp[Index]
        • Set IndexTemp[Index] = TempIndex
        • Set DyingUnit[TempIndex] = No unit
        • Set Index = (Index - 1)
        • Set Loop = (Loop - 1)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Index Equal to 0
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions
 
Too be honest, I didn't understand your coding there. (Mostly the big number of named variables) Seems abit overly complicated just to revive a hero.

However, What I noticed is that your If/Then/Elses are not inside the loop (2nd Trigger). I was not, However, shure if that meant Jack-Diddly-Squat.

Sorry for not being able to help you further.
~MD


-Edit
Lol You guys respond Fast....
Sorry
 
Status
Not open for further replies.
Top