Moderator
M
Moderator
15:06, 15th Nov 2012
Magtheridon96: And with this click, I thee approve.
Magtheridon96: And with this click, I thee approve.
Glaive Tornado Initialization

Events


Map initialization

Conditions

Actions


-------- Allow glaives to cut trees? --------


Set GT_DestroyTrees = True


-------- How many glaives (Corresponding Ability Level) --------


Set GT_Howmany[1] = 2


Set GT_Howmany[2] = 3


Set GT_Howmany[3] = 4


-------- Damage everytime a unit gets hit (Corresponding Ability Level) --------


Set GT_Damage[1] = 5.00


Set GT_Damage[2] = 7.50


Set GT_Damage[3] = 10.00


-------- Lasting Time of Skill (Corresponding Ability Level) --------


Set GT_Lastingtime[1] = 10


Set GT_Lastingtime[2] = 15


Set GT_Lastingtime[3] = 20


-------- Radius, where the glaives will move on (Corresponding Ability Level) --------


Set GT_Radius[1] = 250


Set GT_Radius[2] = 250


Set GT_Radius[3] = 250


-------- How fast the glaives are(Corresponding Ability Level) --------


Set GT_Speed[1] = 36


Set GT_Speed[2] = 36


Set GT_Speed[3] = 36


-------- Radius of the circle in which when units get damaged close to the glaives (Corresponding Ability Level) --------


Set GT_DamageRadius[1] = 100


Set GT_DamageRadius[2] = 100


Set GT_DamageRadius[3] = 100


-------- Sound Effects --------


Set GT_Hit[1] = MetalHeavySliceFlesh1 <gen>


Set GT_Hit[2] = MetalHeavySliceFlesh2 <gen>


Set GT_Hit[3] = MetalHeavySliceFlesh3 <gen>


Set GT_movement = HuntressMissileLaunch <gen>


-------- Special Effects --------


Set GT_HitEffect = Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl


-------- CheckTreeUnit --------


Set GT_point = (Center of (Playable map area))


Unit - Create 1 Peasant for Neutral Passive at GT_point facing Default building facing degrees


Set GT_TreeCheck = (Last created unit)


Custom script: call RemoveLocation( udg_GT_point )


Custom script: call ShowUnit(bj_lastCreatedUnit, false)


Custom script: call UnitAddAbility(bj_lastCreatedUnit, 'Aloc')
Glaive Tornade Cast

Events


Unit - A unit Finishes casting an ability

Conditions


(Ability being cast) Equal to Glaive Tornado

Actions


Set GT_CasterInt = (GT_CasterInt + 1)


Set GT_Caster[GT_CasterInt] = (Triggering unit)


Set GT_Level = (Level of Glaive Tornado for GT_Caster[GT_CasterInt])


Set GT_Player = (Owner of GT_Caster[GT_CasterInt])


For each (Integer A) from 1 to GT_Howmany[GT_Level], do (Actions)



Loop - Actions




Set GT_pointother = (Position of GT_Caster[GT_CasterInt])




Set GT_point = (GT_pointother offset by (Real(GT_Radius[GT_Level])) towards ((360.00 / (Real(GT_Howmany[GT_Level]))) x (Real((Integer A)))) degrees)




Unit - Create 1 Glaive Tornado Dummy for GT_Player at GT_point facing ((360.00 / (Real(GT_Howmany[GT_Level]))) x (Real((Integer A)))) degrees




Set GT_Tempunit = (Last created unit)




Unit - Set the custom value of GT_Tempunit to GT_CasterInt




Custom script: call RemoveLocation( udg_GT_point )




Custom script: call RemoveLocation( udg_GT_pointother )




Unit - Add a (Real(GT_Lastingtime[GT_Level])) second Generic expiration timer to GT_Tempunit




Unit Group - Add GT_Tempunit to GT_GlaiveGroup


Trigger - Turn on Glaive Tornado Dummy <gen>
Glaive Tornado Dummy

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



If - Conditions




(Number of units in GT_GlaiveGroup) Greater than 0



Then - Actions




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





Loop - Actions






Set GT_Tempunit = (Picked unit)






Set GT_CusValue = (Custom value of GT_Tempunit)






Set GT_Player = (Owner of GT_Caster[GT_CusValue])






Set GT_Level = (Level of Glaive Tornado for GT_Caster[GT_CusValue])






Set GT_Angle = ((Integer((Facing of GT_Tempunit))) + GT_Speed[GT_Level])






Set GT_pointother = (Position of GT_Caster[GT_CusValue])






Set GT_point = (GT_pointother offset by (Real(GT_Radius[GT_Level])) towards (Real(GT_Angle)) degrees)






Sound - Play GT_movement at 65.00% volume, located at GT_point with Z offset 0.00






Unit - Make GT_Tempunit face (Real(GT_Angle)) over 0.00 seconds






Unit - Move GT_Tempunit instantly to GT_point






Custom script: call RemoveLocation( udg_GT_point )






Custom script: call RemoveLocation( udg_GT_pointother )






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







If - Conditions








GT_DestroyTrees Equal to True







Then - Actions








Set GT_point = (Position of GT_Tempunit)








Destructible - Pick every destructible within (Real(GT_DamageRadius[GT_Level])) of GT_point and do (Actions)









Loop - Actions










Set GT_Tree = (Picked destructible)










Unit - Order GT_TreeCheck to Harvest GT_Tree










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











If - Conditions












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











Then - Actions












Destructible - Kill GT_Tree











Else - Actions










Unit - Order GT_TreeCheck to Stop








Custom script: call RemoveLocation( udg_GT_point )







Else - Actions






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







If - Conditions








(GT_Caster[GT_CusValue] is dead) Equal to True







Then - Actions








Set GT_point = (Position of GT_Caster[GT_CusValue])








Set GT_Dead = (Units within (Real(GT_Radius[GT_Level])) of GT_point matching (GT_CusValue Equal to (Custom value of (Matching unit))))








Custom script: call RemoveLocation( udg_GT_point )








Unit Group - Pick every unit in GT_Dead and do (Unit - Kill (Picked unit))








Custom script: call DestroyGroup( udg_GT_Dead )







Else - Actions






Set GT_point = (Position of (Picked unit))






Set GT_damaged = (Units within (Real(GT_DamageRadius[GT_Level])) of GT_point matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of GT_Player) Equal to True))))






Custom script: call RemoveLocation( udg_GT_point )






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







Loop - Actions








Set GT_Tempunit = (Picked unit)








Unit - Cause GT_Caster[GT_CusValue] to damage GT_Tempunit, dealing GT_Damage[GT_Level] damage of attack type Spells and damage type Normal








Special Effect - Create a special effect attached to the chest of GT_Tempunit using GT_HitEffect








Special Effect - Destroy (Last created special effect)








Set GT_Sound = (Random integer number between 1 and 3)








Set GT_point = (Position of GT_Tempunit)








Sound - Play GT_Hit[GT_Sound] at 50.00% volume, located at GT_point with Z offset 0.00








Custom script: call RemoveLocation( udg_GT_point )






Custom script: call DestroyGroup( udg_GT_damaged )



Else - Actions




Trigger - Turn off (This trigger)