Moderator
M
Moderator
19:18, 27th Sep 2012
Magtheridon96: Approved.
This is useful and well-coded.
Magtheridon96: Approved.
This is useful and well-coded.
Trigger - Run TA Event <gen> (ignoring conditions)
TA Loop

Events

Conditions

Actions


For each (Integer TA_CurrentIndex) from 1 to TA_MaxIndex, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






TA_Duration[TA_CurrentIndex] Greater than 0.00





Then - Actions






Set TA_Duration[TA_CurrentIndex] = (TA_Duration[TA_CurrentIndex] - TA_Interval)





Else - Actions






Unit - Remove TA_Ability[TA_CurrentIndex] from TA_Unit[TA_CurrentIndex]






Set TA_Ability[TA_CurrentIndex] = TA_Ability[TA_MaxIndex]






Set TA_Duration[TA_CurrentIndex] = TA_Duration[TA_MaxIndex]






Set TA_Unit[TA_CurrentIndex] = TA_Unit[TA_MaxIndex]






Set TA_CurrentIndex = (TA_CurrentIndex - 1)






Set TA_MaxIndex = (TA_MaxIndex - 1)






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








TA_MaxIndex Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions
TA Setup

Events


Map initialization

Conditions

Actions


Set TA_Interval = 0.03


Trigger - Add to TA Loop <gen> the event (Time - Every TA_Interval seconds of game time)
TA Event

Events

Conditions

Actions


For each (Integer TA_CurrentIndex) from 1 to TA_MaxIndex, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






TA_Unit[TA_CurrentIndex] Equal to TA_UnitSet






TA_Ability[TA_CurrentIndex] Equal to TA_AbilitySet





Then - Actions






Set TA_Duration[TA_CurrentIndex] = TA_DurationSet






Custom script: return





Else - Actions


Set TA_MaxIndex = (TA_MaxIndex + 1)


Set TA_Ability[TA_MaxIndex] = TA_AbilitySet


Set TA_Duration[TA_MaxIndex] = TA_DurationSet


Set TA_Unit[TA_MaxIndex] = TA_UnitSet


Unit - Add TA_AbilitySet to TA_UnitSet


Trigger - Turn on TA Loop <gen>