SEA Channel

Acontecimientos


Unidad - A unit Comienza a canalizar una habilidad

Condiciones


(Custom value of (Triggering unit)) No igual a (!=) 0

Acciones


Set SpellEvent_UnitId = (Custom value of (Triggering unit))


Set SpellEvent_SuccesfulCast[SpellEvent_UnitId] = SEA_CASTED_FALSE
SEA BeginsCast

Acontecimientos


Unidad - A unit Comienza a lanzar una habilidad

Condiciones


(Custom value of (Triggering unit)) No igual a (!=) 0

Acciones


Set SpellEvent_UnitId = (Custom value of (Triggering unit))


-------- Here we save the targets data. is easier for everyone --------



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




Si: Condiciones





(Target unit of ability being cast) No igual a (!=) Ninguna unidad




Entonces: Acciones





Set SpellEvent_Target[SpellEvent_UnitId] = (Target unit of ability being cast)





Custom script: set udg_SpellEvent_TargetX[udg_SpellEvent_UnitId] = GetUnitX(udg_SpellEvent_Target[udg_SpellEvent_UnitId])





Custom script: set udg_SpellEvent_TargetY[udg_SpellEvent_UnitId] = GetUnitY(udg_SpellEvent_Target[udg_SpellEvent_UnitId])




Otros: Acciones





Set SpellEvent_Target[SpellEvent_UnitId] = Ninguna unidad





Custom script: set udg_SpellEvent_TargetX[udg_SpellEvent_UnitId] = GetSpellTargetX()





Custom script: set udg_SpellEvent_TargetY[udg_SpellEvent_UnitId] = GetSpellTargetY()


Set SpellEvent_SuccesfulCast[SpellEvent_UnitId] = SEA_CASTED_TRUE


-------- This check might be unnecesary, but if a unit end an spell cast, and starts another in less than a frame, this check will ensure i won't be cleaning the values early --------


Set SpellEvent_SafetyCheck[SpellEvent_UnitId] = True


-------- The unit has oficially began casting --------


Set SpellEvent_IsCasting[SpellEvent_UnitId] = True
SEA Effect

Acontecimientos


Unidad - A unit Inicia el efecto de una habilidad

Condiciones


(Custom value of (Triggering unit)) No igual a (!=) 0

Acciones


Set SpellEvent_UnitId = (Custom value of (Triggering unit))


Set SpellEvent_CurrentSpell[SpellEvent_UnitId] = (Ability being cast)


Set SpellEvent_SuccesfulCast[SpellEvent_UnitId] = SEA_CHANNELING
SEA StopCast

Acontecimientos


Unidad - A unit Detiene el lanzamiento de una habilidad

Condiciones


(Custom value of (Triggering unit)) No igual a (!=) 0

Acciones


Set SpellEvent_UnitId = (Custom value of (Triggering unit))


-------- If the unit hasn't starting casting, then we avoid more work --------



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




Si: Condiciones





SpellEvent_SuccesfulCast[SpellEvent_UnitId] No igual a (!=) SEA_CASTED_FALSE




Entonces: Acciones





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






Si: Condiciones







SpellEvent_SuccesfulCast[SpellEvent_UnitId] Igual a (==) SEA_CASTED_TRUE






Entonces: Acciones







-------- If the unit hasn't started channeling, then we say that the cast failed --------







Set SpellEvent_SuccesfulCast[SpellEvent_UnitId] = SEA_CASTED_FALSE






Otros: Acciones







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








Si: Condiciones









SpellEvent_SuccesfulCast[SpellEvent_UnitId] No igual a (!=) SEA_CASTED_FALSE








Entonces: Acciones









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










Si: Condiciones











SpellEvent_SuccesfulCast[SpellEvent_UnitId] Igual a (==) SEA_CHANNELING










Entonces: Acciones











-------- If the unit is currently channeling, then it means that the unit has cancelled the casting --------











Set SpellEvent_SuccesfulCast[SpellEvent_UnitId] = SEA_STOPPED_CHANNEL











Set SpellEvent_LastCastedSpell[SpellEvent_UnitId] = (Ability being cast)











Set SpellEvent_EC_Finished = False










Otros: Acciones











-------- Else, it means the unit has succesfully finished the cast --------











Set SpellEvent_EC_Finished = True









-------- Now we trigger the event --------









Set SpellEvent_EC_AbilityCasted = (Ability being cast)









Set SpellEvent_EndCast = 0.00









Set SpellEvent_EndCast = 1.00









Set SpellEvent_EndCast = 0.00








Otros: Acciones





-------- We remove the safety --------





Set SpellEvent_SafetyCheck[SpellEvent_UnitId] = False





-------- The unit is no longer casting --------





Set SpellEvent_IsCasting[SpellEvent_UnitId] = False





-------- This timer will trigger the clean function --------





Custom script: if FirstOfGroup(udg_SEA_Group) == null then





Cuenta atrás del reloj - Start SEA_Timer as a Un tiro timer that will expire in 0.02 seconds





Custom script: endif





Grupo de unidad - Add (Triggering unit) to SEA_Group




Otros: Acciones





-------- And we say that the unit is not casting anymore --------





Set SpellEvent_SuccesfulCast[SpellEvent_UnitId] = SEA_NOT_CASTING
SEA Finish

Acontecimientos


Unidad - A unit Finaliza el lanzamiento de una habilidad

Condiciones


(Custom value of (Triggering unit)) No igual a (!=) 0

Acciones


-------- We check this, so we don't get false positives --------


-------- Interesting note: This only happens with Force of nature when you attempt to cast it on a tree-free zone --------



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




Si: Condiciones





SpellEvent_SuccesfulCast[SpellEvent_UnitId] No igual a (!=) SEA_CASTED_FALSE




Entonces: Acciones





Set SpellEvent_UnitId = (Custom value of (Triggering unit))





Set SpellEvent_SuccesfulCast[SpellEvent_UnitId] = SEA_FINISHED_TRUE





Set SpellEvent_LastCastedSpell[SpellEvent_UnitId] = SpellEvent_CurrentSpell[SpellEvent_UnitId]




Otros: Acciones
SEA Clean

Acontecimientos


Tiempo - SEA_Timer expires

Condiciones

Acciones


Grupo de unidad - Pick every unit in SEA_Group and do (Actions)



Bucle: Acciones




Set SpellEvent_UnitId = (Custom value of (Picked unit))





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






Si: Condiciones







SpellEvent_SafetyCheck[SpellEvent_UnitId] Igual a (==) False






Entonces: Acciones







Custom script: set udg_SpellEvent_CurrentSpell[udg_SpellEvent_UnitId] = 0







Set SpellEvent_TargetY[SpellEvent_UnitId] = 0.00







Set SpellEvent_TargetX[SpellEvent_UnitId] = 0.00







Set SpellEvent_Target[SpellEvent_UnitId] = Ninguna unidad







Set SpellEvent_SuccesfulCast[SpellEvent_UnitId] = SEA_NOT_CASTING







Set SpellEvent_CustomTarget[SpellEvent_UnitId] = Ninguna unidad







Set SpellEvent_SafetyCheck[SpellEvent_UnitId] = True






Otros: Acciones




Grupo de unidad - Remove (Picked unit) from SEA_Group