Moderator
M
Moderator
11:55, 2nd Aug 2013
PurgeandFire: Changes made. Approved!
PurgeandFire: Changes made. Approved!
BS Initial

Events


Map initialization

Conditions

Actions


-------- Re-Set those Values to the fitting ones in your map --------


Set BS_Ability = Boulder Strike


Set BS_Dummy[1] = Boulder Dummy 1


Set BS_Dummy[2] = Boulder Dummy 2


Set BS_Dummy[3] = Boulder Dummy 3


-------- Re-Set those Values to the fitting ones in your map --------


-------- Some stuff (DO NOT CHANGE) --------


Custom script: set udg_HarvestDummy = CreateUnit(Player(15), 'hpea', 0, 0, 0)


Unit - Hide HarvestDummy


Custom script: set udg_BS_item = CreateItemLoc( 'texp', Location(0, 0) )


Item - Hide BS_item


Hashtable - Create a hashtable


Set BS_HA = (Last created hashtable)


-------- Abilities Values (Configurable) --------


-------- AoE --------


Set BS_AoE[1] = 250.00


Set BS_AoE[2] = 350.00


Set BS_AoE[3] = 450.00


Set BS_AoE[4] = 550.00


-------- Delay of the Boulder Landing Time --------


Set BS_LandingTime[1] = 1.50


Set BS_LandingTime[2] = 1.50


Set BS_LandingTime[3] = 1.50


Set BS_LandingTime[4] = 1.50


-------- amount of boulders spread after strike --------


Set BS_Boulders[1] = 3


Set BS_Boulders[2] = 5


Set BS_Boulders[3] = 7


Set BS_Boulders[4] = 9


-------- Damage done on impact in AoE --------


Set BS_ImpactDamage[1] = 150.00


Set BS_ImpactDamage[2] = 200.00


Set BS_ImpactDamage[3] = 250.00


Set BS_ImpactDamage[4] = 300.00


-------- DPS dealt by spreaded boulders --------


Set BS_DPS[1] = 50.00


Set BS_DPS[2] = 75.00


Set BS_DPS[3] = 100.00


Set BS_DPS[4] = 125.00


-------- AoE of the DPS --------


Set BS_DPS_AoE[1] = 225.00


Set BS_DPS_AoE[2] = 225.00


Set BS_DPS_AoE[3] = 225.00


Set BS_DPS_AoE[4] = 225.00


-------- Speed of which the spreaded boulders travel --------


Set BS_BoulderSpeed[1] = 1000.00


Set BS_BoulderSpeed[2] = 1000.00


Set BS_BoulderSpeed[3] = 1000.00


Set BS_BoulderSpeed[4] = 1000.00


-------- knockback speed --------


Set BS_KnockbackSpeed[1] = 1250.00


Set BS_KnockbackSpeed[2] = 1250.00


Set BS_KnockbackSpeed[3] = 1250.00


Set BS_KnockbackSpeed[4] = 1250.00


-------- Knockback Distance --------


-------- ---------------------------------- --------


-------- by setting this values to -1.00, it will make the spell knockback to the end of the AoE, setting it to other values will make the spell use the wanted value --------


-------- ---------------------------------- --------


Set BS_Knockback_Distance[1] = -1.00


Set BS_Knockback_Distance[2] = -1.00


Set BS_Knockback_Distance[3] = -1.00


Set BS_Knockback_Distance[4] = -1.00
BS Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to BS_Ability

Actions


Set temp_int = (Level of BS_Ability for (Triggering unit))


Set loc = (Target point of ability being cast)


Unit - Create 1 BS_Dummy[1] for (Triggering player) at loc facing Default building facing degrees


Animation - Change (Last created unit) flying height to 0.00 at (1000.00 / BS_LandingTime[temp_int])


Unit Group - Add (Last created unit) to BS_Group


Set Key = (Key (Last created unit))


Hashtable - Save temp_int as 0 of Key in BS_HA


Hashtable - Save BS_LandingTime[temp_int] as 1 of Key in BS_HA


Unit - Add a BS_LandingTime[temp_int] second Generic expiration timer to (Last created unit)


Custom script: call RemoveLocation(udg_loc)


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



If - Conditions




BS_Instances Equal to 0



Then - Actions




Trigger - Turn on BS Loop <gen>



Else - Actions


Set BS_Instances = (BS_Instances + 1)
BS Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


Unit Group - Pick every unit in BS_Group and do (Actions)



Loop - Actions




Set Unit = (Picked unit)




Custom script: set udg_Key = GetHandleId(udg_Unit)




Set temp_int = (Load 0 of Key from BS_HA)




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





If - Conditions






(Unit-type of (Picked unit)) Equal to Boulder Dummy 1





Then - Actions






Set temp_real = ((Load 1 of Key from BS_HA) - 0.03)






Hashtable - Save temp_real as 1 of Key in BS_HA






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







If - Conditions








temp_real Less than or equal to 0.00







Then - Actions








If ((Random percentage) Less than or equal to 50.00) then do (Set temp_real1 = 6.00) else do (Set temp_real1 = -6.00)








Set loc = (Position of Unit)








Unit - Create 1 BS_Dummy[3] for (Owner of Unit) at loc facing Default building facing degrees








Animation - Change (Last created unit)'s size to ((BS_AoE[temp_int] / 1.25)%, 0.00%, 0.00%) of its original size








Unit - Kill (Last created unit)








Set UGroup = (Units within BS_AoE[temp_int] of loc matching ((((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) belongs to an ally of (Owner of Unit)) Equal to False)) and (((Matching unit) is dead) Equal to False)) and (((Matching unit) is A struc








Unit Group - Add all units of UGroup to BS_Group








Unit Group - Pick every unit in UGroup and do (Actions)









Loop - Actions










Set BS_Instances = (BS_Instances + 1)










Set Unit1 = (Picked unit)










Custom script: set udg_Key1 = GetHandleId(udg_Unit1)










Set loc1 = (Position of Unit1)










Unit - Cause Unit to damage Unit1, dealing BS_ImpactDamage[temp_int] damage of attack type Spells and damage type Magic










Hashtable - Save temp_int as 0 of Key1 in BS_HA










Hashtable - Save (Angle from loc to loc1) as 1 of Key1 in BS_HA










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











If - Conditions












BS_Knockback_Distance[temp_int] Equal to -1.00











Then - Actions












Hashtable - Save (BS_AoE[temp_int] - (Distance between loc and loc1)) as 2 of Key1 in BS_HA











Else - Actions












Hashtable - Save BS_Knockback_Distance[temp_int] as 2 of Key1 in BS_HA










Custom script: call RemoveLocation(udg_loc1)








For each (Integer temp_int1) from 1 to BS_Boulders[temp_int], do (Actions)









Loop - Actions










Unit - Create 1 BS_Dummy[2] for (Owner of Unit) at loc facing ((360.00 / (Real(BS_Boulders[temp_int]))) x (Real(temp_int1))) degrees










Set BS_Instances = (BS_Instances + 1)










Unit Group - Add (Last created unit) to BS_Group










Hashtable - Save temp_int as 0 of (Key (Last created unit)) in BS_HA










Hashtable - Save ((360.00 / (Real(BS_Boulders[temp_int]))) x (Real(temp_int1))) as 1 of (Key (Last created unit)) in BS_HA










Hashtable - Save BS_AoE[temp_int] as 2 of (Key (Last created unit)) in BS_HA










Hashtable - Save temp_real1 as 3 of (Key (Last created unit)) in BS_HA








Unit Group - Remove Unit from BS_Group








Hashtable - Clear all child hashtables of child Key in BS_HA








Custom script: call DestroyGroup(udg_UGroup)








Custom script: call RemoveLocation(udg_loc)








Set BS_Instances = (BS_Instances - 1)








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









If - Conditions










BS_Instances Equal to 0









Then - Actions










Trigger - Turn off (This trigger)









Else - Actions







Else - Actions





Else - Actions






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







If - Conditions








(Unit-type of (Picked unit)) Equal to Boulder Dummy 2







Then - Actions








Set temp_real = (Load 2 of Key from BS_HA)








Set temp_real = (temp_real - (BS_BoulderSpeed[temp_int] x 0.03))








Hashtable - Save temp_real as 2 of Key in BS_HA








Set temp_real1 = (Load 1 of Key from BS_HA)








Set temp_real1 = (temp_real1 + (Load 3 of Key from BS_HA))








Hashtable - Save temp_real1 as 1 of Key in BS_HA








Set loc = (Position of Unit)








Set loc1 = (loc offset by (BS_BoulderSpeed[temp_int] x 0.03) towards temp_real1 degrees)








Special Effect - Create a special effect at loc using Abilities\Spells\Other\Volcano\VolcanoMissile.mdl








Special Effect - Destroy (Last created special effect)








Unit - Move Unit instantly to loc1








Destructible - Pick every destructible within BS_DPS_AoE[temp_int] of loc and do (Actions)









Loop - Actions










Unit - Order HarvestDummy to Harvest (Picked destructible)










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











If - Conditions












(Current order of HarvestDummy) Equal to (Order(harvest))











Then - Actions












Destructible - Kill (Picked destructible)











Else - Actions










Unit - Order HarvestDummy to Stop








Set UGroup = (Units within BS_DPS_AoE[temp_int] of loc matching ((((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) belongs to an ally of (Owner of Unit)) Equal to False)) and (((Matching unit) is dead) Equal to False)) and (((Matching unit) is A s








Unit Group - Pick every unit in UGroup and do (Actions)









Loop - Actions










Unit - Cause Unit to damage (Picked unit), dealing (BS_DPS[temp_int] x 0.03) damage of attack type Spells and damage type Magic








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









If - Conditions










temp_real Less than or equal to 0.00









Then - Actions










Unit - Kill Unit










Unit Group - Remove Unit from BS_Group










Hashtable - Clear all child hashtables of child Key in BS_HA










Set BS_Instances = (BS_Instances - 1)










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











If - Conditions












BS_Instances Equal to 0











Then - Actions












Trigger - Turn off (This trigger)











Else - Actions









Else - Actions








Custom script: call DestroyGroup(udg_UGroup)








Custom script: call RemoveLocation(udg_loc)








Custom script: call RemoveLocation(udg_loc1)







Else - Actions








Set loc = (Position of Unit)








Set CP_Point = (loc offset by (BS_KnockbackSpeed[temp_int] x 0.03) towards (Load 1 of Key from BS_HA) degrees)








Set temp_real = (Load 2 of Key from BS_HA)








Set temp_real = (temp_real - (BS_KnockbackSpeed[temp_int] x 0.03))








Hashtable - Save temp_real as 2 of Key in BS_HA








Special Effect - Create a special effect at loc using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl








Special Effect - Destroy (Last created special effect)








Trigger - Run Check Walkability <gen> (checking conditions)








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









If - Conditions










CP_PointIsWalkable Equal to True









Then - Actions










Custom script: call SetUnitX(udg_Unit, GetLocationX(udg_CP_Point))










Custom script: call SetUnitY(udg_Unit, GetLocationY(udg_CP_Point))









Else - Actions








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









If - Conditions










temp_real Less than or equal to 0.00









Then - Actions










Unit Group - Remove Unit from BS_Group










Hashtable - Clear all child hashtables of child Key in BS_HA










Set BS_Instances = (BS_Instances - 1)










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











If - Conditions












BS_Instances Equal to 0











Then - Actions












Trigger - Turn off (This trigger)











Else - Actions









Else - Actions








Custom script: call RemoveLocation(udg_loc)








Custom script: call RemoveLocation(udg_loc1)
V. 1.0Uploaded at Hive
V. 1.1*Fixed some lines in the triggers
*You now can change the knockback distance and switch between End of the AoE or Custom Value
V. 1.2*Changed the x and y variables into temp_int and temp_real variables
*Changed the way the system checks if it has to turn off the loop to an integer count
*Trigger Fixes
*Now the System uses PnF's Check Walkability System