Moderator
M
Moderator
15:00, 28th Jun 2010
TriggerHappy:
Fixed the leaks.
It's MUI as well.
TriggerHappy:
Fixed the leaks.
It's MUI as well.
Missile Barrage Cast

Events


Unit - A unit Initie l'effet d'une compétence

Conditions


(Ability being cast) Egal à Missile Barrage

Actions


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



If - Conditions




MB_Counter Equal 0



Then - Actions




Trigger - Turn on Missile Barrage Loop <gen>



Else - Actions


-------- Index And Counter DATA --------


Set MB_Index = (MB_Index + 1)


Set MB_Counter = (MB_Counter + 1)


-------- -------- Caster DATA --------- --------


Set MB_Caster[MB_Index] = (Casting unit)


Set MB_CasterLocation[MB_Index] = (Position of MB_Caster[MB_Index])


-------- -------- Target DATA --------- --------


Set MB_Target[MB_Index] = (Target unit of ability being cast)


Set MB_TargetLocation[MB_Index] = (Position of MB_Target[MB_Index])


-------- ------- Constant DATA ------ --------


Set MB_Level[MB_Index] = (Level of Missile Barrage for MB_Caster[MB_Index])


Set MB_Player[MB_Index] = (Owner of MB_Caster[MB_Index])


-------- ---- Configurable DATA --- --------


Set MB_Speed[MB_Index] = 15.00


Set MB_Distance[MB_Index] = 150.00


Set MB_MaxDistance[MB_Index] = 300.00


Set MB_MissileNumber[MB_Index] = (10 + (2 x MB_Level[MB_Index]))


Set MB_KnockPerMissile[MB_Index] = 15.00


Set MB_Damage[MB_Index] = (12.00 + (3.00 x (Real(MB_Level[MB_Index]))))


Set MB_Effect[MB_Index] = Abilities\Spells\NightElf\Taunt\TauntCaster.mdl


-------- ------------ !Starting! ----------- --------


Special Effect - Create a special effect attached to the origine of MB_Caster[MB_Index] using MB_Effect[MB_Index]


Special Effect - Destroy (Last created special effect)


Special Effect - Create a special effect attached to the origine of MB_Target[MB_Index] using MB_Effect[MB_Index]


Special Effect - Destroy (Last created special effect)


For each (Integer A) from 1 to MB_MissileNumber[MB_Index], do (Actions)



Loop - Actions




Set MB_Angle[MB_Index] = (360.00 / (Real(MB_MissileNumber[MB_Index])))




Set TempPoint = (MB_CasterLocation[MB_Index] offset by MB_Distance[MB_Index] towards (MB_Angle[MB_Index] x (Real((Integer A)))) degrees)




Unit - Create 1 Missile Barrrage ( DUMMY) for MB_Player[MB_Index] at TempPoint facing (MB_Angle[MB_Index] x (Real((Integer A)))) degrees




Unit Group - Add (Last created unit) to MB_DummyGroup[MB_Index]




Unit - Turn collision for (Last created unit) Off




Custom script: call RemoveLocation( udg_TempPoint )


Custom script: call RemoveLocation( udg_MB_TargetLocation[ udg_MB_Index ] )
Missile Barrage Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer MB_Integer) from 1 to MB_Index, do (Actions)



Loop - Actions




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





If - Conditions






MB_Booleen[MB_Integer] Egal à FALSE





Then - Actions






Set MB_Distance[MB_Integer] = (MB_Distance[MB_Integer] + MB_Speed[MB_Integer])






Unit Group - Pick every unit in MB_DummyGroup[MB_Integer] and do (Actions)







Loop - Actions








Set MB_DummyLocation[MB_Integer] = (Position of (Picked unit))








Set MB_Angle[MB_Integer] = (Angle from MB_CasterLocation[MB_Integer] to MB_DummyLocation[MB_Integer])








Set MB_MoveLocation[MB_Integer] = (MB_CasterLocation[MB_Integer] offset by MB_Distance[MB_Integer] towards MB_Angle[MB_Integer] degrees)








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









If - Conditions










(Terrain pathing at MB_MoveLocation[MB_Integer] of type En marchant is off) Egal à FALSE









Then - Actions










Unit - Move (Picked unit) instantly to MB_MoveLocation[MB_Integer]









Else - Actions










Unit - Kill (Picked unit)










Unit Group - Remove (Picked unit) from MB_DummyGroup[MB_Integer]








Custom script: call RemoveLocation( udg_MB_MoveLocation[ udg_MB_Integer ] )








Custom script: call RemoveLocation( udg_MB_DummyLocation[ udg_MB_Integer ] )






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







If - Conditions








MB_Distance[MB_Integer] Supérieur ou égal à MB_MaxDistance[MB_Integer]







Then - Actions








Set MB_Booleen[MB_Integer] = TRUE







Else - Actions





Else - Actions






Unit - Pick every unit in MB_DummyGroup[MB_Integer] and do (Actions)







Loop - Actions








Set MB_DummyLocation[MB_Integer] = (Position of (Picked unit))








Set MB_TargetLocation[MB_Integer] = (Position of MB_Target[MB_Integer])








Set MB_Distance[MB_Integer] = ((Distance between MB_TargetLocation[MB_Integer] and MB_DummyLocation[MB_Integer]) - MB_Speed[MB_Integer])








Set MB_MoveLocation[MB_Integer] = (MB_DummyLocation[MB_Integer] offset by MB_Speed[MB_Integer] towards (Facing of (Picked unit)) degrees)








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









If - Conditions










(Terrain pathing at MB_MoveLocation[MB_Integer] of type En marchant is off) Egal à FALSE









Then - Actions










Unit - Move (Picked unit) instantly to MB_MoveLocation[MB_Integer], facing MB_TargetLocation[MB_Integer]









Else - Actions










Unit - Kill (Picked unit)










Unit Group - Remove (Picked unit) from MB_DummyGroup[MB_Integer]








Custom script: call RemoveLocation( udg_MB_MoveLocation[ udg_MB_Integer ] )








Custom script: call RemoveLocation( udg_MB_DummyLocation[ udg_MB_Integer ] )








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









If - Conditions










MB_Distance[MB_Integer] Inférieur à 50.00









Then - Actions










Set MB_DummyLocation[MB_Integer] = (Position of (Picked unit))










Set MB_Angle[MB_Integer] = (Angle from MB_TargetLocation[MB_Integer] to MB_DummyLocation[MB_Integer])










Set MB_MoveLocation[MB_Integer] = (MB_TargetLocation[MB_Integer] offset by MB_KnockPerMissile[MB_Integer] towards (MB_Angle[MB_Integer] + 180.00) degrees)










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











If - Conditions












(MB_Target[MB_Integer] is alive) Egal à TRUE











Then - Actions












Unit - Move MB_Target[MB_Integer] instantly to MB_MoveLocation[MB_Integer], facing MB_TargetLocation[MB_Integer]











Else - Actions










Unit - Cause MB_Caster[MB_Integer] to damage MB_Target[MB_Integer], dealing MB_Damage[MB_Integer] damage of attack type Siège and damage type Universel










Unit Group - Remove (Picked unit) from MB_DummyGroup[MB_Integer]










Unit - Kill (Picked unit)










Custom script: call RemoveLocation( udg_MB_DummyLocation[ udg_MB_Integer ] )










Custom script: call RemoveLocation( udg_MB_MoveLocation[ udg_MB_Integer ] )









Else - Actions








Custom script: call RemoveLocation( udg_MB_TargetLocation[ udg_MB_Integer ] )






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







If - Conditions








(Number of units in MB_DummyGroup[MB_Integer]) Egal à 0







Then - Actions








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









If - Conditions










MB_Finish[MB_Integer] Egal à FALSE









Then - Actions










Set MB_Finish[MB_Integer] = TRUE










Set MB_Counter = (MB_Counter - 1)










Custom script: call DestroyGroup( udg_MB_DummyGroup[ udg_MB_Counter ] )










Custom script: call RemoveLocation( udg_MB_CasterLocation[ udg_MB_Integer ] )









Else - Actions







Else - Actions


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



If - Conditions




MB_Counter Equal 0



Then - Actions




Trigger - Turn off (This trigger)




Set MB_Index = 0



Else - Actions