Moderator
M
Moderator
09:21, 11th Jun 2010
TriggerHappy:
Coding was leakless and MUI.
TriggerHappy:
Coding was leakless and MUI.
ClusterBombs

Events


Unit - A unit Begins casting an ability

Conditions


(Ability being cast) Equal to ClusterBombing Run

Actions


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



If - Conditions




ClSpellNumber Equal to 0



Then - Actions




Trigger - Turn on ClusterBombsRunDrop <gen>



Else - Actions


Set ClSpellNumber = (ClSpellNumber + 1)


Set ClusterDropArea[ClSpellNumber] = False


Set SpecLocPoint[ClSpellNumber] = (Target point of ability being cast)


Set SpecCaster = (Triggering unit)


Set SpecCirCenter = (Position of SpecCaster)


Set Loc_to_remove = (SpecCirCenter offset by 400.00 towards ((Angle from SpecCirCenter to SpecLocPoint[ClSpellNumber]) + 180.00) degrees)


Set SpeBombsCount[ClSpellNumber] = ((Level of ClusterBombing Run for SpecCaster) x 10)


Unit - Create 1 Cluster Bomber for (Owner of SpecCaster) at Loc_to_remove facing SpecLocPoint[ClSpellNumber]


Set ClusterBpmber[ClSpellNumber] = (Last created unit)


Unit - Add AmountOfBombs (Neutral Hostile) to ClusterBpmber[ClSpellNumber]


Unit - Set level of AmountOfBombs (Neutral Hostile) for (Last created unit) to (Level of ClusterBombing Run for SpecCaster)


Unit - Order ClusterBpmber[ClSpellNumber] to Move To SpecLocPoint[ClSpellNumber]


Custom script: call RemoveLocation (udg_SpecCirCenter)


Custom script: call RemoveLocation (udg_Loc_to_remove)
ClusterBombsRunDrop

Events


Time - Every 0.07 seconds of game time

Conditions


1 Equal to 1

Actions


For each (Integer CB) from 1 to ClSpellNumber, do (Actions)



Loop - Actions




Set Loc_to_remove2 = (Position of ClusterBpmber[CB])




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





If - Conditions






(ClusterBpmber[CB] is alive) Equal to True





Then - Actions






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







If - Conditions








ClusterDropArea[CB] Equal to False







Then - Actions








Set Loc_to_remove = (Position of ClusterBpmber[CB])








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









If - Conditions










(Distance between Loc_to_remove and SpecLocPoint[CB]) Less than or equal to 200.00









Then - Actions










Set ClusterDropArea[CB] = True









Else - Actions







Else - Actions








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









If - Conditions










SpeBombsCount[CB] Greater than 0









Then - Actions










Set Loc_to_remove = (Position of ClusterBpmber[CB])










Unit - Create 1 Dummy one (Bombs) for (Owner of ClusterBpmber[CB]) at Loc_to_remove facing Default building facing degrees










Set Loc_to_remove = (Loc_to_remove2 offset by (Random real number between 100.00 and 500.00) towards ((Facing of ClusterBpmber[CB]) + (Random real number between -60.00 and 60.00)) degrees)










Unit - Order (Last created unit) to Attack Ground Loc_to_remove










Unit - Add a 1.00 second Generic expiration timer to (Last created unit)










Set Loc_to_remove = (Loc_to_remove2 offset by 200.00 towards (Facing of ClusterBpmber[CB]) degrees)










Unit - Order ClusterBpmber[CB] to Move To Loc_to_remove










Set SpeBombsCount[CB] = (SpeBombsCount[CB] - 1)









Else - Actions










Set OffMapDestruction = (Loc_to_remove2 offset by 200.00 towards (Facing of ClusterBpmber[CB]) degrees)










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











If - Conditions












(Terrain pathing at OffMapDestruction of type Flyability is off) Equal to True











Then - Actions












Unit - Kill ClusterBpmber[CB]











Else - Actions












Unit - Order ClusterBpmber[CB] to Move To OffMapDestruction






Custom script: call RemoveLocation (udg_Loc_to_remove)






Custom script: call RemoveLocation (udg_Loc_to_remove2)






Custom script: call RemoveLocation (udg_OffMapDestruction)





Else - Actions
SeekerIntialize

Events


Unit - A unit Begins casting an ability

Conditions


(Ability being cast) Equal to SeekerDrone

Actions


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



If - Conditions




Seeker_cast Equal to 0



Then - Actions




Trigger - Turn on SeekerAttack <gen>



Else - Actions


Set Seeker_cast = (Seeker_cast + 1)


Set SeekerDrone = (((Level of SeekerDrone for (Triggering unit)) + 1) x 2)


Set Loc_to_remove = (Position of (Triggering unit))


Unit - Create 1 SeekerDrone for (Owner of (Triggering unit)) at Loc_to_remove facing (Facing of (Triggering unit)) degrees


Set Seeker_Drone[Seeker_cast] = (Last created unit)


Set Seeker_Targer[Seeker_cast] = (Target unit of ability being cast)


Unit - Add a (Real(SeekerDrone)) second Generic expiration timer to (Last created unit)


Unit - Add DeathExplosion (Goblin Mine) to (Last created unit)


Unit - Set level of DeathExplosion (Goblin Mine) for (Last created unit) to (Level of SeekerDrone for (Triggering unit))


Unit - Order (Last created unit) to Attack Seeker_Targer[Seeker_cast]


Custom script: call RemoveLocation (udg_Loc_to_remove)
SeekerAttack

Events


Time - Every 0.04 seconds of game time

Conditions

Actions


For each (Integer SD) from 1 to Seeker_cast, do (Actions)



Loop - Actions




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





If - Conditions






(Seeker_Drone[SD] is alive) Equal to True





Then - Actions






Set PositionofSeekerdrone = (Position of Seeker_Drone[SD])






Set PositionofSeekerTarget = (Position of Seeker_Targer[SD])






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







If - Conditions








(Distance between PositionofSeekerdrone and PositionofSeekerTarget) Less than or equal to 120.00







Then - Actions








Unit - Kill Seeker_Drone[SD]







Else - Actions






Custom script: call RemoveLocation (udg_PositionofSeekerTarget)






Custom script: call RemoveLocation (udg_PositionofSeekerdrone)





Else - Actions
Seeker Death

Events


Unit - A unit Dies

Conditions


(Unit-type of (Triggering unit)) Equal to SeekerDrone

Actions


Set Loc_to_remove = (Position of (Triggering unit))


Special Effect - Create a special effect at Loc_to_remove using Abilities\Weapons\SteamTank\SteamTankImpact.mdl


Special Effect - Destroy (Last created special effect)


For each (Integer Maker) from 1 to 20, do (Actions)



Loop - Actions




Set Loc_to_remove2 = (Loc_to_remove offset by 100.00 towards (18.00 x (Real(Maker))) degrees)




Unit - Create 1 Effect: ExplosiveHelpers (Barrage) for (Owner of (Triggering unit)) at Loc_to_remove facing (18.00 x (Real(Maker))) degrees




Unit - Add a 0.50 second Generic expiration timer to (Last created unit)




Unit - Add DeathExplosion(miniBombs) (Goblin Mine) to (Last created unit)




Unit - Set level of DeathExplosion(miniBombs) (Goblin Mine) for (Last created unit) to (Level of DeathExplosion (Goblin Mine) for (Triggering unit))




Set Loc_to_remove2 = (Loc_to_remove offset by 300.00 towards ((Real(Maker)) x 18.00) degrees)




Unit - Order (Last created unit) to Move To Loc_to_remove2




Custom script: call RemoveLocation (udg_Loc_to_remove2)


Custom script: call RemoveLocation (udg_Loc_to_remove)