Moderator
M
Moderator
11:20, 2nd Mar 2010
TriggerHappy:
Coding seemed fine and the spell worked.
TriggerHappy:
Coding seemed fine and the spell worked.
Crow Swarm Init

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Crow Swarm

Actions


Unit Group - Add (Triggering unit) to Caster_Group


Set Caster_Loc = (Position of (Triggering unit))


Set Target_Loc = (Target point of ability being cast)


Set Crow_Spawn = (Caster_Loc offset by 130.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)


Set Crow_angle_Standard = (Angle from Caster_Loc to Target_Loc)


Set Crow_Number = ((Level of Crow Swarm for (Triggering unit)) x 3)


Set Temp_Boolean = True


Hashtable - Save Handle OfCrow_Spawn as 2 of (Key (Triggering unit)) in table


Hashtable - Save Crow_angle_Standard as 3 of (Key (Triggering unit)) in table


Hashtable - Save Crow_Number as 4 of (Key (Triggering unit)) in table


Hashtable - Save Temp_Boolean as 8 of (Key (Triggering unit)) in table


Trigger - Turn on Crow Swarm Spawn <gen>


Custom script: call RemoveLocation(udg_Caster_Loc)


Custom script: call RemoveLocation(udg_Target_Loc)
Crow Swarm Spawn

Events


Time - Every 0.25 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 Caster_Group) Greater than or equal to 1



Then - Actions




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





Loop - Actions






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







If - Conditions








((Picked unit) is Stunned) Equal to False








((Picked unit) is alive) Equal to True








(Load 4 of (Key (Picked unit)) from table) Greater than or equal to 1








(Load 8 of (Key (Picked unit)) from table) Equal to True







Then - Actions








Set Crow_Spawn = (Load 2 of (Key (Picked unit)) in table)








Set Crow_angle_Standard = (Load 3 of (Key (Picked unit)) from table)








Special Effect - Create a special effect at Crow_Spawn using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl








Unit - Create 1 Druid of the Talon (Storm Crow Form) for (Owner of (Picked unit)) at Crow_Spawn facing Crow_angle_Standard degrees








Special Effect - Destroy (Last created special effect)








Special Effect - Create a special effect attached to the head of (Last created unit) using Abilities\Weapons\AvengerMissile\AvengerMissile.mdl








Hashtable - Save Handle Of(Last created special effect) as 6 of (Key (Last created unit)) in table








Set Crow_Angle = (Crow_angle_Standard - (Random real number between -20.00 and 20.00))








Hashtable - Save Crow_Angle as 5 of (Key (Last created unit)) in table








Hashtable - Save 830 as 7 of (Key (Last created unit)) in table








Unit Group - Add (Last created unit) to Crow_Group








Set Count = ((Load 4 of (Key (Picked unit)) from table) - 1)








Hashtable - Save Count as 4 of (Key (Picked unit)) in table








Hashtable - Save (Level of Crow Swarm for (Picked unit)) as 4 of (Key (Last created unit)) in table








Trigger - Turn on Crow Fly Loop <gen>








Trigger - Turn on Crow Dead <gen>







Else - Actions








Hashtable - Clear all child hashtables of child (Key (Picked unit)) in table








Unit Group - Remove (Picked unit) from Caster_Group



Else - Actions




Trigger - Turn off (This trigger)
Crow Fly Loop

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 Crow_Group) Greater than 0



Then - Actions




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





Loop - Actions






Set Crow = (Picked unit)






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







If - Conditions








(Load 7 of (Key (Picked unit)) from table) Greater than or equal to 0







Then - Actions








Set Crow_Loc_Temp = (Position of Crow)








Set Crow_Target_Temp = (Crow_Loc_Temp offset by 20.00 towards (Load 5 of (Key (Picked unit)) from table) degrees)








Set Crow_Angle = (Load 5 of (Key (Picked unit)) from table)








Unit - Move Crow instantly to Crow_Target_Temp, facing Crow_Angle degrees








Custom script: call RemoveLocation(udg_Crow_Loc_Temp)








Set Target_Group = (Units within 100.00 of Crow_Target_Temp matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner o








Set Level = (Load 4 of (Key (Picked unit)) from table)








Set SFX = (Load 6 of (Key (Picked unit)) in table)








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









Loop - Actions










Set Target_Loc_Temp = (Position of (Picked unit))










Unit - Cause Crow to damage (Picked unit), dealing (Real(Damage[Level])) damage of attack type Spells and damage type Normal










Unit - Create 1 Dummy for (Owner of Crow) at Target_Loc_Temp facing Default building facing degrees










Unit - Set level of Armor Reduction for (Last created unit) to Level










Unit - Order (Last created unit) to Attack (Picked unit)










Special Effect - Create a special effect at Crow_Target_Temp using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl










Special Effect - Destroy (Last created special effect)










Special Effect - Create a special effect at Crow_Target_Temp using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl










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










Unit Group - Remove Crow from Crow_Group










Unit - Hide Crow










Unit - Add a 1.00 second Generic expiration timer to Crow










Special Effect - Destroy (Last created special effect)










Special Effect - Destroy SFX










Custom script: call RemoveLocation(udg_Target_Loc)








Custom script: call RemoveLocation(udg_Crow_Target_Temp)








Hashtable - Save ((Load 7 of (Key (Picked unit)) from table) - 20) as 7 of (Key (Picked unit)) in table








Custom script: call DestroyGroup(udg_Target_Group)







Else - Actions








Set SFX = (Load 6 of (Key (Picked unit)) in table)








Unit Group - Remove Crow from Crow_Group








Unit - Hide Crow








Unit - Add a 1.00 second Generic expiration timer to Crow








Special Effect - Destroy SFX



Else - Actions




Trigger - Turn off Crow Dead <gen>




Trigger - Turn off (This trigger)
Crow Dead

Events


Unit - A unit Dies

Conditions


(Unit-type of (Triggering unit)) Equal to Druid of the Talon (Storm Crow Form)

Actions


Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in table
Crow Disable

Events


Unit - A unit Stops casting an ability

Conditions


(Ability being cast) Equal to Crow Swarm

Actions


Set Temp_Boolean = False


Hashtable - Save Temp_Boolean as 8 of (Key (Triggering unit)) in table