Moderator
M
Moderator
| Maker, Angry Birds V1.15, 23rd Dec |
|
| Maker, Angry Birds V1.05, 22nd Dec |
|
Angry Birds Configuration

Events


Map initialization

Conditions

Actions


-------- Do not touch --------


Hashtable - Create a hashtable


Set AB_Hash = (Last created hashtable)


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


-------- Determines how many Birds are made per tree at maximum --------


Set AB_BirdsPerTreeBase = 1


Set AB_BirdsPerTreePerLevel = 1


-------- Determines how long the birds last for --------


Set AB_DurationBase = 3.00


Set AB_DurationPerLevel = 2.00


-------- Determines how much damage each bird deals per peck --------


Set AB_PeckDamageBase = 10.00


Set AB_PeckDamagePerLevel = 10.00


-------- Determines the AOE of the spell --------


Set AB_AoeBase = 300.00


Set AB_AoePerLevel = 100.00


-------- Determines the speed of the birds flying --------


Set AB_BirdSpeed = 9.00


-------- Determines the flying height of the birds --------


Set AB_BirdHeight = 150.00


-------- Determines the Size of the birds (it is a percentage) --------


Set AB_BirdScale = 50.00


-------- Determines the Bird Unit --------


Set AB_Bird = Bird


-------- Determines the Bird Spell --------


Set AB_Spell = Angry Birds


-------- Determines the Bird Pecking sfx --------


Set AB_PeckSFX = Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl


-------- Determines the Bird Creation --------


Set AB_CreationSFX = Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl


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


-------- Tree Checking Setup --------


-------- Do not touch --------


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


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


Set AB_TreeChecker = (Last created unit)


Unit - Hide AB_TreeChecker


Unit - Make AB_TreeChecker Invulnerable


Custom script: call RemoveLocation (udg_AB_TempPoint)


-------- ------ --------
Angry Birds Activation

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to AB_Spell

Actions


Set AB_U = (Triggering unit)


Set AB_TempReal = (Real((Level of AB_Spell for AB_U)))


Set AB_TempReal2 = (AB_AoeBase + (AB_AoePerLevel x AB_TempReal))


Set AB_TempPoint = (Target point of ability being cast)


Set AB_TempGroup = (Units within AB_TempReal2 of AB_TempPoint)


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



Loop - Actions




Set AB_TempU = (Picked unit)




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





If - Conditions






(AB_TempU is Magic Immune) Equal to False






(AB_TempU is A structure) Equal to False






(AB_TempU is alive) Equal to True






(AB_TempU belongs to an enemy of (Owner of AB_U)) Equal to True






(AB_TempU is A ground unit) Equal to True





Then - Actions






Unit Group - Add AB_TempU to AB_TargetStore





Else - Actions


Custom script: call DestroyGroup(udg_AB_TempGroup)


Destructible - Pick every destructible within AB_TempReal2 of AB_TempPoint and do (Actions)



Loop - Actions




Unit - Order AB_TreeChecker to Harvest (Picked destructible)




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





If - Conditions






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





Then - Actions






Set AB_TempPoint2 = (Position of (Picked destructible))






For each (Integer AB_I) from 1 to (AB_BirdsPerTreeBase + (AB_BirdsPerTreePerLevel x (Level of AB_Spell for AB_U))), do (Actions)







Loop - Actions








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









If - Conditions










(AB_TargetStore is empty) Equal to False









Then - Actions










Unit - Create 1 AB_Bird for (Owner of AB_U) at AB_TempPoint2 facing Default building facing degrees










Set AB_TempU = (Last created unit)










Custom script: set udg_AB_UHandle = GetHandleId(udg_AB_TempU)










Animation - Change AB_TempU flying height to AB_BirdHeight at 0.00










Animation - Change AB_TempU's size to (AB_BirdScale%, AB_BirdScale%, AB_BirdScale%) of its original size










Special Effect - Create a special effect at AB_TempPoint2 using AB_CreationSFX










Special Effect - Destroy (Last created special effect)










Unit - Add a (AB_DurationBase + (AB_DurationPerLevel x AB_TempReal)) second Generic expiration timer to AB_TempU










-------- Original Caster ID --------










Hashtable - Save Handle OfAB_U as 1 of AB_UHandle in AB_Hash










-------- Bird Stage ID --------










Hashtable - Save 1 as 3 of AB_UHandle in AB_Hash










-------- Bird Peck Damage --------










Hashtable - Save (AB_PeckDamageBase + (AB_PeckDamagePerLevel x AB_TempReal)) as 4 of AB_UHandle in AB_Hash










-------- Bird Animation Control --------










Hashtable - Save 30 as 5 of AB_UHandle in AB_Hash










Unit Group - Add AB_TempU to AB_Birds










Custom script: set udg_AB_TempU2 = FirstOfGroup(udg_AB_TargetStore)










Hashtable - Save Handle OfAB_TempU2 as 2 of AB_UHandle in AB_Hash










Unit Group - Remove AB_TempU2 from AB_TargetStore










Custom script: call DestroyGroup(udg_AB_TempGroup)









Else - Actions






Custom script: call RemoveLocation(udg_AB_TempPoint2)





Else - Actions




Unit - Order AB_TreeChecker to Stop


Custom script: call RemoveLocation(udg_AB_TempPoint)


Unit Group - Remove all units from AB_TargetStore


Trigger - Turn on Angry Birds Loop <gen>
Angry Birds Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


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



Loop - Actions




Set AB_U = (Picked unit)




Custom script: set udg_AB_UHandle = GetHandleId(udg_AB_U)




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





If - Conditions






Or - Any (Conditions) are true







Conditions








(AB_U is dead) Equal to True








((Load 2 of AB_UHandle in AB_Hash) is dead) Equal to True





Then - Actions






Unit - Kill AB_U






Unit Group - Remove AB_U from AB_Birds






Hashtable - Clear all child hashtables of child AB_UHandle in AB_Hash






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







If - Conditions








(AB_Birds is empty) Equal to True







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions






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







If - Conditions








(Load 3 of AB_UHandle from AB_Hash) Equal to 1







Then - Actions








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









If - Conditions










(Load 5 of AB_UHandle from AB_Hash) Equal to 30









Then - Actions










Hashtable - Save 0 as 5 of AB_UHandle in AB_Hash










Animation - Play AB_U's walk animation









Else - Actions










Hashtable - Save ((Load 5 of AB_UHandle from AB_Hash) + 1) as 5 of AB_UHandle in AB_Hash








Set AB_TempPoint = (Position of AB_U)








Set AB_TempPoint2 = (Position of (Load 2 of AB_UHandle in AB_Hash))








Set AB_Angle = (Angle from AB_TempPoint to AB_TempPoint2)








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









If - Conditions










(Distance between AB_TempPoint and AB_TempPoint2) Less than or equal to 50.00









Then - Actions










Hashtable - Save 30 as 5 of AB_UHandle in AB_Hash










Hashtable - Save 2 as 3 of AB_UHandle in AB_Hash









Else - Actions








Custom script: call RemoveLocation(udg_AB_TempPoint2)








Custom script: call RemoveLocation(udg_AB_TempPoint)








Custom script: set udg_AB_TempX = GetUnitX(udg_AB_U)








Custom script: set udg_AB_TempY = GetUnitY(udg_AB_U)








Custom script: call SetUnitX(udg_AB_U, udg_AB_TempX + udg_AB_BirdSpeed * Cos(udg_AB_Angle * bj_DEGTORAD))








Custom script: call SetUnitY(udg_AB_U, udg_AB_TempY + udg_AB_BirdSpeed * Sin(udg_AB_Angle * bj_DEGTORAD))








Custom script: call SetUnitFacing(udg_AB_U, udg_AB_Angle)







Else - Actions






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







If - Conditions








(Load 3 of AB_UHandle from AB_Hash) Equal to 2







Then - Actions








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









If - Conditions










(Load 5 of AB_UHandle from AB_Hash) Equal to 30









Then - Actions










Hashtable - Save 0 as 5 of AB_UHandle in AB_Hash










Animation - Play AB_U's attack animation










Set AB_TempU = (Load 2 of AB_UHandle in AB_Hash)










Unit - Cause (Load 1 of AB_UHandle in AB_Hash) to damage AB_TempU, dealing (Load 4 of AB_UHandle from AB_Hash) damage of attack type Spells and damage type Normal










Special Effect - Create a special effect attached to the overhead of AB_TempU using AB_PeckSFX










Special Effect - Destroy (Last created special effect)










Set AB_TempPoint = (Position of AB_U)










Set AB_TempPoint2 = (Position of (Load 2 of AB_UHandle in AB_Hash))










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











If - Conditions












(Distance between AB_TempPoint and AB_TempPoint2) Greater than 50.00











Then - Actions












Hashtable - Save 1 as 3 of AB_UHandle in AB_Hash











Else - Actions










Custom script: call RemoveLocation(udg_AB_TempPoint2)










Custom script: call RemoveLocation(udg_AB_TempPoint)









Else - Actions










Hashtable - Save ((Load 5 of AB_UHandle from AB_Hash) + 1) as 5 of AB_UHandle in AB_Hash







Else - Actions