jnZ
I
- Reaction score
- 64
Hey, I tried around for a few hours but I somehow can't come up with a reason why my trigger doesn't work.
The basic function is this: in my map are 5 heroes, each assigned to a global variable SYS_HERO[1-5]. The 'Hero Revive Start' trigger is supposed to figure out which of those heroes died when the trigger runs (events don't show up in the code because they are added via another trigger as specific unit dies events - but the trigger starts up fine so this is probably not the issue) and starts a timer.
I checked by adding a game message action and the loop exits with the right integer value for the corresponding hero but all timers except for HEROES_R_Timer[1] don't work. Timer 1 works perfectly but 2-5 just show a timer window with no timer that never goes aways.
Any help would be greatly appreciated. Cheers.
The basic function is this: in my map are 5 heroes, each assigned to a global variable SYS_HERO[1-5]. The 'Hero Revive Start' trigger is supposed to figure out which of those heroes died when the trigger runs (events don't show up in the code because they are added via another trigger as specific unit dies events - but the trigger starts up fine so this is probably not the issue) and starts a timer.
Code:
Hero Revive Start
Events
Conditions
Actions
Set HEROES_R_TempUnit = (Triggering unit)
Set HEROES_R_TempPlayer = (Owner of HEROES_R_TempUnit)
For each (Integer HEROES_R_TempInteger[1]) from 1 to 5, do (Actions)
Schleifen - Aktionen
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
SYS_Hero[HEROES_R_TempInteger[1]] Gleich HEROES_R_TempUnit
'THEN'-Aktionen
Set HEROES_R_TempInteger[2] = HEROES_R_TempInteger[1]
Custom script: exitwhen true
'ELSE'-Aktionen
Countdown-Timer - Start HEROES_R_Timer[HEROES_R_TempInteger[2]] as a Einmalig timer that will expire in 15.00 seconds
Countdown-Timer - Create a timer window for HEROES_R_Timer[HEROES_R_TempInteger[2]] with title ((Name of HEROES_R_TempUnit) + revives in:)
Set HEROES_R_TimerWindow[HEROES_R_TempInteger[2]] = (Last created timer window)
Countdown-Timer - Change the color of the title for HEROES_R_TimerWindow[HEROES_R_TempInteger[2]] to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Countdown-Timer - Change the color of the time for HEROES_R_TimerWindow[HEROES_R_TempInteger[2]] to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Countdown-Timer - Zeigen HEROES_R_TimerWindow[HEROES_R_TempInteger[2]] for HEROES_R_TempPlayer
I checked by adding a game message action and the loop exits with the right integer value for the corresponding hero but all timers except for HEROES_R_Timer[1] don't work. Timer 1 works perfectly but 2-5 just show a timer window with no timer that never goes aways.
Any help would be greatly appreciated. Cheers.