CBar Config

Events


Map initialization

Conditions

Actions


Set VariableSet CBar_Ability = Thunder Clap


Trigger - Run CBar Generate <gen> (checking conditions)


Set VariableSet CBar_Ability = Storm Hammer


Trigger - Run CBar Generate <gen> (checking conditions)
CBar Generate

Events

Conditions

Actions


Set VariableSet CBar_Abilities_c = (CBar_Abilities_c + 1)


Set VariableSet CBar_Abilities[CBar_Abilities_c] = CBar_Ability
CBar Cast

Events


Unit - A unit Begins channeling an ability

Conditions

Actions


For each (Integer CBar_Loop) from 1 to CBar_Abilities_c, do (Actions)



Loop - Actions




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





If - Conditions






(Ability being cast) Equal to CBar_Abilities[CBar_Loop]





Then - Actions






Set VariableSet CBar_Rnd = (Random integer number between 1 and 100)






Set VariableSet CBar_Time[CBar_Rnd] = (Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field Casting Time ('acas'), of Level: ((Level of (Ability being cast) for (Triggering unit)) - 1))






Set VariableSet CBar_Time[CBar_Rnd] = (1.00 / (CBar_Time[CBar_Rnd] + 0.20))






Set VariableSet CBar_Point_A = ((Position of (Triggering unit)) offset by (0.00, 50.00))






Unit - Create 1 Progress Bar (Dummy) for (Owner of (Triggering unit)) at CBar_Point_A facing 270.00 degrees






Unit - Set the custom value of (Last created unit) to CBar_Rnd






Unit - Set the custom value of (Casting unit) to CBar_Rnd






Custom script: call RemoveLocation(udg_CBar_Point_A)






Set VariableSet CBar_Bar_c[CBar_Rnd] = (Last created unit)





Else - Actions
CBar DummyBar

Events


Unit - A unit enters (Playable map area)

Conditions


(Unit-type of (Triggering unit)) Equal to Progress Bar (Dummy)

Actions


Animation - Change (Triggering unit)'s animation speed to (CBar_Time[(Custom value of (Triggering unit))] x 100.00)% of its original speed
CBar Cast Stop

Events


Unit - A unit Stops casting an ability

Conditions

Actions


For each (Integer CBar_Loop) from 1 to CBar_Abilities_c, do (Actions)



Loop - Actions




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





If - Conditions






(Ability being cast) Equal to CBar_Abilities[CBar_Loop]






CBar_Bar_c[(Custom value of (Triggering unit))] Not equal to No unit





Then - Actions






Set VariableSet CBar_Temp_i = (Custom value of (Triggering unit))






Unit - Change color of CBar_Bar_c[CBar_Temp_i] to Red






Animation - Change CBar_Bar_c[CBar_Temp_i]'s animation speed to 0.00% of its original speed






Animation - Change CBar_Bar_c[CBar_Temp_i]'s vertex coloring to (100.00%, 35.00%, 35.00%) with 0.00% transparency






Unit - Kill CBar_Bar_c[CBar_Temp_i]






Set VariableSet CBar_Bar_c[CBar_Temp_i] = No unit






Unit - Set the custom value of (Triggering unit) to 0





Else - Actions
CBar Cast Finish

Events


Unit - A unit Starts the effect of an ability

Conditions

Actions


For each (Integer CBar_Loop) from 1 to CBar_Abilities_c, do (Actions)



Loop - Actions




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





If - Conditions






(Ability being cast) Equal to CBar_Abilities[CBar_Loop]






CBar_Bar_c[(Custom value of (Triggering unit))] Not equal to No unit





Then - Actions






Set VariableSet CBar_Temp_i = (Custom value of (Triggering unit))






Unit - Change color of CBar_Bar_c[CBar_Temp_i] to Light Blue






Animation - Change CBar_Bar_c[CBar_Temp_i]'s animation speed to 0.00% of its original speed






Animation - Change CBar_Bar_c[CBar_Temp_i]'s vertex coloring to (100.00%, 35.00%, 35.00%) with 0.00% transparency






Unit - Kill CBar_Bar_c[CBar_Temp_i]






Set VariableSet CBar_Bar_c[CBar_Temp_i] = No unit






Unit - Set the custom value of (Triggering unit) to 0





Else - Actions