• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

AngryBirds Aura Public Release 1.00

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Well it is an aura I made for the recent zephyr contest and since it is over officially I figured it would be fine to submit it now.

What it is about is well... You'll have to see for yourself to see it truly however I will attempt to give a few details. You can have 1 - 4 birds circle you as you level the skill, they are very angry and want to attack stuff. They can fly around and attack stuff.



[trigger=]
Events
Map initialization
Conditions
Actions
-------- If your map is suffering from load time issues you can feel free to change Map initalization to Time - Elasped game time is 0.00 or any range from 0 to 2.00 seconds --------
Custom script: set udg_AngryBirdsTimerSpeed = 0.0312500
-------- This is the main ability you learn to start the entire system --------
Set AngryBirdAbility = Angry Birds Aura
-------- This is the ability that shows up in the status bar that lets you see this spell as an aura --------
Set AngryBirdBuffAbility = AngryBirds AuraSFX
-------- This is the ability required to pick up units in range to target --------
Set AngryBirdDetectAbility = TargetDetector
-------- This is the dummy unit required for people to visually see the aura --------
Set AngryBirdDummy = Angry Bird
-------- This is the distance from the hero/caster when they're circling like an aura --------
Set AngryBirdDistFromHero = 100.00
-------- This is the speed they travel at --------
Set AngryBirdSpeed = 15.00
-------- This is the highest the collision will rise when the bird is attempting to land and hit the target --------
Set AngryBirdMaxCollisionRadius = 512.00
-------- This is the speed of the bird flying up and down --------
Set AngryBirdFlySpeed = 30.00
-------- This sets the current attack type to spells to mimic a real spell in-game --------
Set AngryBirdAttackType = Spells
-------- This sets it so damage goes through armor --------
Set AngryBirdDamageType = Universal
-------- This is the effect that appears when a bird soars down and hits the target --------
Set AngryBirdSFX = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
-------- This sets it so the birds can't continually distract enemies forever --------
-------- Set it to 0 if you don't want them to be timed --------
-------- Default is 0.05 seconds per 0.03 seconds. --------
Set AngryBirdMinusTimerSpeed = 0.05
-------- This is the speed which the aura rotates at --------
Set AngryBirdAuraRotateSpeed = 5.00
-------- This is the highest birds will fly up too. --------
Set AngryBirdsMaxHeight = 500.00
-------- The return trip is AngryBirdsMaxHeight - 200 --------
-------- This is the lowest the birds will ever fly, it sadly does not work below 10 due to WC3 bugs --------
Set AngryBirdsMinHeight = 15.00
-------- This is the range it can be for a bird to return to a hero/unit --------
Set AngryBirdsReturnRadius = 150.00
-------- The range the birds start to fly down is 2x this --------
-------- This is the rate the birds will turn at and what makes them move realisticly like birds --------
Set AngryBirdsTurningSpeed = 0.25
-------- This is the area/radius that units will be damaged in --------
Set AngryBirdsCollisionOnImpact = 256.00
-------- This is how long it'll take to cooldown --------
Set AngryBirdsMaxCooldownToHit = 0.20
-------- This is the speed it counts up at per 0.03 seconds --------
Set AngryBirdsCooldownSpeed = 0.01
-------- This is how fast the collision detection for landing on targets increases per 0.03 seconds --------
Set AngryBirdsCollisionSpedBuildup = 0.25
-------- You can change the default flying height of the dummy units in object editor, don't need to waste variable space for this --------

[/trigger]



[trigger=]
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Angry Birds Aura
Actions
-------- Configureable --------
-------- We check to make sure the hero is learning it for the first time so we only need to start one instance --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of AngryBirdAbility for (Triggering unit)) Greater than 0
(Level of AngryBirdAbility for (Triggering unit)) Less than 2
Then - Actions
-------- This starts the index or raises it so a new instance can be created --------
Set AngryBirdIndex = (AngryBirdIndex + 1)
-------- This is how you catch the learning hero --------
Set AngryBirdCaster[AngryBirdIndex] = (Triggering unit)
-------- This is adding a hidden ability so it'll show up as an aura in the status bar --------
Unit - Add AngryBirdBuffAbility to AngryBirdCaster[AngryBirdIndex]
-------- This identifies the owner of the hero and consumes less function calls --------
Set AngryBirdPlayer[AngryBirdIndex] = (Owner of AngryBirdCaster[AngryBirdIndex])
Else - Actions
-------- We catch every instance from 1 to 4 with this and create the rest of the start of the spell such as dummy unit creation and damage --------
For each (Integer AngryBirdLoop2) from 1 to AngryBirdIndex, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering unit) Equal to AngryBirdCaster[AngryBirdLoop2]
Then - Actions
-------- This is the position of the learning hero --------
Set AngryBirdp = (Position of AngryBirdCaster[AngryBirdLoop2])
-------- This is how long birds can target once they're hovering over them --------
Set AngryBird1OriginalRecall[AngryBirdLoop2] = (20.00 + ((Real((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]))) x 5.00))
Set AngryBird1TimerTilRecall[AngryBirdLoop2] = AngryBird1OriginalRecall[AngryBirdLoop2]
Set AngryBird2OriginalRecall[AngryBirdLoop2] = (20.00 + ((Real((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]))) x 5.00))
Set AngryBird2TimerTilRecall[AngryBirdLoop2] = AngryBird2OriginalRecall[AngryBirdLoop2]
Set AngryBird3OriginalRecall[AngryBirdLoop2] = (20.00 + ((Real((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]))) x 5.00))
Set AngryBird3TimerTilRecall[AngryBirdLoop2] = AngryBird3OriginalRecall[AngryBirdLoop2]
Set AngryBird4OriginalRecall[AngryBirdLoop2] = (20.00 + ((Real((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]))) x 5.00))
Set AngryBird4TimerTilRecall[AngryBirdLoop2] = AngryBird4OriginalRecall[AngryBirdLoop2]
-------- --------
-------- This is how many times the birds will hit before returning to the hero --------
Set AngryBird1MaxHitAmount[AngryBirdLoop2] = (2 + ((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]) x 3))
Set AngryBird2MaxHitAmount[AngryBirdLoop2] = (2 + ((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]) x 3))
Set AngryBird3MaxHitAmount[AngryBirdLoop2] = (2 + ((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]) x 3))
Set AngryBird4MaxHitAmount[AngryBirdLoop2] = (2 + ((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]) x 3))
-------- --------
-------- This is where you configure damage when the birds fly down and slam the target --------
Set AngryBirdDMG[AngryBirdLoop2] = (10.00 + ((Real((Level of AngryBirdAbility for AngryBirdCaster[AngryBirdLoop2]))) x 5.00))
-------- Dont touch beyond this comment --------
-------- Not Configureable Easily --------
-------- --------
-------- This is where we basically set up the aura such as creating each unit per level of the ability --------
-------- This ability will only work up to level 4 currently --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird1[AngryBirdLoop2] Equal to No unit
Then - Actions
Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdLoop2] at AngryBirdp facing Default building facing degrees
Set AngryBird1[AngryBirdLoop2] = (Last created unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird2[AngryBirdLoop2] Equal to No unit
Then - Actions
Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdLoop2] at AngryBirdp facing Default building facing degrees
Set AngryBird2[AngryBirdLoop2] = (Last created unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird3[AngryBirdLoop2] Equal to No unit
Then - Actions
Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdLoop2] at AngryBirdp facing Default building facing degrees
Set AngryBird3[AngryBirdLoop2] = (Last created unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird4[AngryBirdLoop2] Equal to No unit
Then - Actions
Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdLoop2] at AngryBirdp facing Default building facing degrees
Set AngryBird4[AngryBirdLoop2] = (Last created unit)
Else - Actions
Custom script: call RemoveLocation(udg_AngryBirdp)
-------- This is to set the rotations so they're not clumped together and so they look like an aura --------
Set AngryBird1Rotation[AngryBirdLoop2] = 90.00
Set AngryBird2Rotation[AngryBirdLoop2] = 180.00
Set AngryBird3Rotation[AngryBirdLoop2] = 270.00
Set AngryBird4Rotation[AngryBirdLoop2] = 360.00
-------- --------
Else - Actions
-------- This is where we turn on the trigger that runs the entire system, don't want it to be left on consuming RAM when it isn't needed. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdIndex Equal to 1
Then - Actions
Countdown Timer - Start AngryBirdsTimer as a Repeating timer that will expire in AngryBirdsTimerSpeed seconds
Trigger - Turn on AngryBirdLooper <gen>
Else - Actions

[/trigger]



[trigger=]
Events
Time - AngryBirdsTimer expires
Conditions
Actions
For each (Integer AngryBirdLoop) from 1 to AngryBirdIndex, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdCaster[AngryBirdLoop] Equal to No unit
Or - Any (Conditions) are true
Conditions
AngryBird1[AngryBirdLoop] Not equal to No unit
AngryBird2[AngryBirdLoop] Not equal to No unit
AngryBird3[AngryBirdLoop] Not equal to No unit
AngryBird4[AngryBirdLoop] Not equal to No unit
AngryBirdTarget1[AngryBirdLoop] Not equal to No unit
AngryBirdTarget2[AngryBirdLoop] Not equal to No unit
AngryBirdTarget3[AngryBirdLoop] Not equal to No unit
AngryBirdTarget4[AngryBirdLoop] Not equal to No unit
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird1[AngryBirdLoop] Not equal to No unit
Then - Actions
Unit - Kill AngryBird1[AngryBirdLoop]
Set AngryBird1[AngryBirdLoop] = AngryBird1[AngryBirdIndex]
Set AngryBird1[AngryBirdIndex] = No unit
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird2[AngryBirdLoop] Not equal to No unit
Then - Actions
Unit - Kill AngryBird2[AngryBirdLoop]
Set AngryBird2[AngryBirdLoop] = AngryBird2[AngryBirdIndex]
Set AngryBird2[AngryBirdIndex] = No unit
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird3[AngryBirdLoop] Not equal to No unit
Then - Actions
Unit - Kill AngryBird3[AngryBirdLoop]
Set AngryBird3[AngryBirdLoop] = AngryBird3[AngryBirdIndex]
Set AngryBird3[AngryBirdIndex] = No unit
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird4[AngryBirdLoop] Not equal to No unit
Then - Actions
Unit - Kill AngryBird4[AngryBirdLoop]
Set AngryBird4[AngryBirdLoop] = AngryBird4[AngryBirdIndex]
Set AngryBird4[AngryBirdIndex] = No unit
Else - Actions
Set AngryBirdCaster[AngryBirdLoop] = AngryBirdCaster[AngryBirdIndex]
Set AngryBirdCaster[AngryBirdIndex] = No unit
Set AngryBirdIndex = (AngryBirdIndex - 1)
Set AngryBirdLoop = (AngryBirdLoop - 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AngryBirdCaster[AngryBirdLoop] is dead) Not equal to True
AngryBirdDiedOnce[AngryBirdLoop] Equal to True
Then - Actions
Set AngryBirdp = (Position of AngryBirdCaster[AngryBirdLoop])
Unit - Move AngryBird1[AngryBirdLoop] instantly to AngryBirdp
Unit - Move AngryBird2[AngryBirdLoop] instantly to AngryBirdp
Unit - Move AngryBird3[AngryBirdLoop] instantly to AngryBirdp
Unit - Move AngryBird4[AngryBirdLoop] instantly to AngryBirdp
Custom script: call RemoveLocation(udg_AngryBirdp)
Set AngryBirdDiedOnce[AngryBirdLoop] = False
Animation - Change AngryBird1[AngryBirdLoop]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Animation - Change AngryBird2[AngryBirdLoop]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Animation - Change AngryBird3[AngryBirdLoop]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Animation - Change AngryBird4[AngryBirdLoop]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Unit - Add AngryBirdDetectAbility to AngryBird1[AngryBirdLoop]
Unit - Add AngryBirdDetectAbility to AngryBird2[AngryBirdLoop]
Unit - Add AngryBirdDetectAbility to AngryBird3[AngryBirdLoop]
Unit - Add AngryBirdDetectAbility to AngryBird4[AngryBirdLoop]
Unit Group - Remove AngryBird1[AngryBirdLoop] from AngryBirdRunningGroup
Unit Group - Remove AngryBird2[AngryBirdLoop] from AngryBirdRunningGroup
Unit Group - Remove AngryBird3[AngryBirdLoop] from AngryBirdRunningGroup
Unit Group - Remove AngryBird4[AngryBirdLoop] from AngryBirdRunningGroup
Set AngryBird4AmountOfHits[AngryBirdLoop] = 0
Set AngryBird1Rotation[AngryBirdLoop] = 90.00
Set AngryBird2Rotation[AngryBirdLoop] = 180.00
Set AngryBird3Rotation[AngryBirdLoop] = 270.00
Set AngryBird4Rotation[AngryBirdLoop] = 360.00
Set AngryBird1CooldownToHit[AngryBirdLoop] = 0.00
Set AngryBird2CooldownToHit[AngryBirdLoop] = 0.00
Set AngryBird3CooldownToHit[AngryBirdLoop] = 0.00
Set AngryBird4CooldownToHit[AngryBirdLoop] = 0.00
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AngryBirdCaster[AngryBirdLoop] is dead) Equal to True
Then - Actions
Set AngryBirdDiedOnce[AngryBirdLoop] = True
Set AngryBirdHitInProgress1[AngryBirdLoop] = False
Set AngryBirdRecall1[AngryBirdLoop] = False
Set AngryBirdHitInProgress2[AngryBirdLoop] = False
Set AngryBirdRecall2[AngryBirdLoop] = False
Set AngryBirdHitInProgress3[AngryBirdLoop] = False
Set AngryBirdRecall3[AngryBirdLoop] = False
Set AngryBirdHitInProgress4[AngryBirdLoop] = False
Set AngryBirdRecall4[AngryBirdLoop] = False
Unit - Remove Angry Birds buff from AngryBirdTarget1[AngryBirdLoop]
Unit - Remove Angry Birds buff from AngryBirdTarget2[AngryBirdLoop]
Unit - Remove Angry Birds buff from AngryBirdTarget3[AngryBirdLoop]
Unit - Remove Angry Birds buff from AngryBirdTarget4[AngryBirdLoop]
Unit - Remove TargetDetector from AngryBird1[AngryBirdLoop]
Unit - Remove TargetDetector from AngryBird2[AngryBirdLoop]
Unit - Remove TargetDetector from AngryBird3[AngryBirdLoop]
Unit - Remove TargetDetector from AngryBird4[AngryBirdLoop]
Set AngryBirdTarget1[AngryBirdLoop] = No unit
Set AngryBirdTarget2[AngryBirdLoop] = No unit
Set AngryBirdTarget3[AngryBirdLoop] = No unit
Set AngryBirdTarget4[AngryBirdLoop] = No unit
Animation - Change AngryBird1[AngryBirdLoop]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
Animation - Change AngryBird2[AngryBirdLoop]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
Animation - Change AngryBird3[AngryBirdLoop]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
Animation - Change AngryBird4[AngryBirdLoop]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
Animation - Change AngryBird1[AngryBirdLoop] flying height to (Default flying height of AngryBird1[AngryBirdLoop]) at 0.00
Animation - Change AngryBird2[AngryBirdLoop] flying height to (Default flying height of AngryBird2[AngryBirdLoop]) at 0.00
Animation - Change AngryBird3[AngryBirdLoop] flying height to (Default flying height of AngryBird3[AngryBirdLoop]) at 0.00
Animation - Change AngryBird4[AngryBirdLoop] flying height to (Default flying height of AngryBird4[AngryBirdLoop]) at 0.00
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdDiedOnce[AngryBirdLoop] Equal to False
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird1[AngryBirdLoop] Not equal to No unit
AngryBirdHitInProgress1[AngryBirdLoop] Equal to False
AngryBirdRecall1[AngryBirdLoop] Equal to False
Then - Actions
Set AngryBirdp = (Position of AngryBirdCaster[AngryBirdLoop])
Set AngryBird1Rotation[AngryBirdLoop] = (AngryBird1Rotation[AngryBirdLoop] + AngryBirdAuraRotateSpeed)
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdDistFromHero towards AngryBird1Rotation[AngryBirdLoop] degrees)
Unit - Move AngryBird1[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird1[AngryBirdLoop] face AngryBird1Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
Custom script: call RemoveLocation(udg_AngryBirdp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AngryBirdTarget1[AngryBirdLoop] is dead) Equal to True
Then - Actions
Set AngryBird1AmountOfHits[AngryBirdLoop] = AngryBird1MaxHitAmount[AngryBirdLoop]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdHitInProgress1[AngryBirdLoop] Equal to True
AngryBird1AmountOfHits[AngryBirdLoop] Less than AngryBird1MaxHitAmount[AngryBirdLoop]
Then - Actions
Set AngryBirdp = (Position of AngryBird1[AngryBirdLoop])
Set AngryBirdTargetp = (Position of AngryBirdTarget1[AngryBirdLoop])
Set AngryBird1Rotation[AngryBirdLoop] = (Angle from AngryBirdp to AngryBirdTargetp)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird1TimerTilRecall[AngryBirdLoop] Less than or equal to 0.00
Then - Actions
Set AngryBird1AmountOfHits[AngryBirdLoop] = AngryBird1MaxHitAmount[AngryBirdLoop]
Else - Actions
Set AngryBird1TimerTilRecall[AngryBirdLoop] = (AngryBird1TimerTilRecall[AngryBirdLoop] - AngryBirdMinusTimerSpeed)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird1CooldownToHit[AngryBirdLoop] Less than AngryBirdsMaxCooldownToHit
Then - Actions
Set AngryBird1CooldownToHit[AngryBirdLoop] = (AngryBird1CooldownToHit[AngryBirdLoop] + AngryBirdsCooldownSpeed)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between AngryBirdp and AngryBirdTargetp) Greater than AngryBird1DistReqToCollide[AngryBirdLoop]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird1[AngryBirdLoop]) Less than AngryBirdsMaxHeight
Then - Actions
Animation - Change AngryBird1[AngryBirdLoop] flying height to ((Current flying height of AngryBird1[AngryBirdLoop]) + (AngryBirdFlySpeed / 2.00)) at 0.00
Else - Actions
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdSpeed towards (Facing of AngryBird1[AngryBirdLoop]) degrees)
Unit - Move AngryBird1[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird1[AngryBirdLoop] face AngryBird1Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird1DistReqToCollide[AngryBirdLoop] Less than AngryBirdMaxCollisionRadius
Then - Actions
Set AngryBird1DistReqToCollide[AngryBirdLoop] = (AngryBird1DistReqToCollide[AngryBirdLoop] + AngryBirdsCollisionSpedBuildup)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird1[AngryBirdLoop]) Greater than 10.00
AngryBird1CooldownToHit[AngryBirdLoop] Greater than or equal to AngryBirdsMaxCooldownToHit
Then - Actions
Animation - Change AngryBird1[AngryBirdLoop] flying height to ((Current flying height of AngryBird1[AngryBirdLoop]) - AngryBirdFlySpeed) at 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird1[AngryBirdLoop]) Less than or equal to (AngryBirdsMinHeight + 5.00)
Then - Actions
Set AngryBird1AmountOfHits[AngryBirdLoop] = (AngryBird1AmountOfHits[AngryBirdLoop] + 1)
Special Effect - Create a special effect at AngryBirdp using AngryBirdSFX
Special Effect - Destroy (Last created special effect)
Set AngryBirdCollideGroup = (Units within AngryBirdsCollisionOnImpact of AngryBirdp)
Unit Group - Pick every unit in AngryBirdCollideGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of AngryBirdPlayer[AngryBirdLoop]) Equal to True
Then - Actions
Unit - Cause AngryBirdCaster[AngryBirdLoop] to damage (Picked unit), dealing AngryBirdDMG[AngryBirdLoop] damage of attack type AngryBirdAttackType and damage type AngryBirdDamageType
Else - Actions
Custom script: call DestroyGroup(udg_AngryBirdCollideGroup)
Set AngryBird1CooldownToHit[AngryBirdLoop] = 0.00
Set AngryBird1DistReqToCollide[AngryBirdLoop] = 0.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird1[AngryBirdLoop]) Less than AngryBirdsMaxHeight
Then - Actions
Animation - Change AngryBird1[AngryBirdLoop] flying height to ((Current flying height of AngryBird1[AngryBirdLoop]) + AngryBirdFlySpeed) at 0.00
Else - Actions
Custom script: call RemoveLocation(udg_AngryBirdp)
Custom script: call RemoveLocation(udg_AngryBirdTargetp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdRecall1[AngryBirdLoop] Equal to False
Then - Actions
Unit - Remove Angry Birds buff from AngryBirdTarget1[AngryBirdLoop]
Set AngryBirdTarget1[AngryBirdLoop] = No unit
Set AngryBirdHitInProgress1[AngryBirdLoop] = False
Set AngryBirdRecall1[AngryBirdLoop] = True
Else - Actions
Set AngryBirdp = (Position of AngryBird1[AngryBirdLoop])
Set AngryBirdTargetp = (Position of AngryBirdCaster[AngryBirdLoop])
Set AngryBird1Rotation[AngryBirdLoop] = (Angle from AngryBirdp to AngryBirdTargetp)
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdSpeed towards (Facing of AngryBird1[AngryBirdLoop]) degrees)
Unit - Move AngryBird1[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird1[AngryBirdLoop] face AngryBird1Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between AngryBirdp and AngryBirdTargetp) Greater than (AngryBirdsReturnRadius x 2.00)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird1[AngryBirdLoop]) Less than (AngryBirdsMaxHeight - 200.00)
Then - Actions
Animation - Change AngryBird1[AngryBirdLoop] flying height to ((Current flying height of AngryBird1[AngryBirdLoop]) + AngryBirdFlySpeed) at 0.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird1[AngryBirdLoop]) Less than or equal to AngryBirdsMinHeight
(Distance between AngryBirdp and AngryBirdTargetp) Less than AngryBirdsReturnRadius
Then - Actions
Set AngryBird1TimerTilRecall[AngryBirdLoop] = AngryBird1OriginalRecall[AngryBirdLoop]
Animation - Change AngryBird1[AngryBirdLoop] flying height to (Default flying height of AngryBird1[AngryBirdLoop]) at 0.00
Unit Group - Remove AngryBird1[AngryBirdLoop] from AngryBirdRunningGroup
Set AngryBird1AmountOfHits[AngryBirdLoop] = 0
Set AngryBirdRecall1[AngryBirdLoop] = False
Unit - Add AngryBirdDetectAbility to AngryBird1[AngryBirdLoop]
Set AngryBird1Rotation[AngryBirdLoop] = 90.00
Set AngryBird2Rotation[AngryBirdLoop] = 180.00
Set AngryBird3Rotation[AngryBirdLoop] = 270.00
Set AngryBird4Rotation[AngryBirdLoop] = 360.00
Else - Actions
Animation - Change AngryBird1[AngryBirdLoop] flying height to ((Current flying height of AngryBird1[AngryBirdLoop]) - AngryBirdFlySpeed) at 0.00
Custom script: call RemoveLocation(udg_AngryBirdp)
Custom script: call RemoveLocation(udg_AngryBirdTargetp)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird2[AngryBirdLoop] Not equal to No unit
AngryBirdHitInProgress2[AngryBirdLoop] Equal to False
AngryBirdRecall2[AngryBirdLoop] Equal to False
Then - Actions
Set AngryBirdp = (Position of AngryBirdCaster[AngryBirdLoop])
Set AngryBird2Rotation[AngryBirdLoop] = (AngryBird2Rotation[AngryBirdLoop] + AngryBirdAuraRotateSpeed)
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdDistFromHero towards AngryBird2Rotation[AngryBirdLoop] degrees)
Unit - Move AngryBird2[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird2[AngryBirdLoop] face AngryBird2Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
Custom script: call RemoveLocation(udg_AngryBirdp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AngryBirdTarget2[AngryBirdLoop] is dead) Equal to True
Then - Actions
Set AngryBird2AmountOfHits[AngryBirdLoop] = AngryBird2MaxHitAmount[AngryBirdLoop]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdHitInProgress2[AngryBirdLoop] Equal to True
AngryBird2AmountOfHits[AngryBirdLoop] Less than AngryBird2MaxHitAmount[AngryBirdLoop]
Then - Actions
Set AngryBirdp = (Position of AngryBird2[AngryBirdLoop])
Set AngryBirdTargetp = (Position of AngryBirdTarget2[AngryBirdLoop])
Set AngryBird2Rotation[AngryBirdLoop] = (Angle from AngryBirdp to AngryBirdTargetp)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird2TimerTilRecall[AngryBirdLoop] Less than or equal to 0.00
Then - Actions
Set AngryBird2AmountOfHits[AngryBirdLoop] = AngryBird2MaxHitAmount[AngryBirdLoop]
Else - Actions
Set AngryBird2TimerTilRecall[AngryBirdLoop] = (AngryBird2TimerTilRecall[AngryBirdLoop] - AngryBirdMinusTimerSpeed)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird2CooldownToHit[AngryBirdLoop] Less than AngryBirdsMaxCooldownToHit
Then - Actions
Set AngryBird2CooldownToHit[AngryBirdLoop] = (AngryBird2CooldownToHit[AngryBirdLoop] + AngryBirdsCooldownSpeed)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between AngryBirdp and AngryBirdTargetp) Greater than AngryBird2DistReqToCollide[AngryBirdLoop]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird2[AngryBirdLoop]) Less than AngryBirdsMaxHeight
Then - Actions
Animation - Change AngryBird2[AngryBirdLoop] flying height to ((Current flying height of AngryBird2[AngryBirdLoop]) + (AngryBirdFlySpeed / 2.00)) at 0.00
Else - Actions
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdSpeed towards (Facing of AngryBird2[AngryBirdLoop]) degrees)
Unit - Move AngryBird2[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird2[AngryBirdLoop] face AngryBird2Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird2DistReqToCollide[AngryBirdLoop] Less than AngryBirdMaxCollisionRadius
Then - Actions
Set AngryBird2DistReqToCollide[AngryBirdLoop] = (AngryBird2DistReqToCollide[AngryBirdLoop] + AngryBirdsCollisionSpedBuildup)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird2[AngryBirdLoop]) Greater than 10.00
AngryBird2CooldownToHit[AngryBirdLoop] Greater than or equal to AngryBirdsMaxCooldownToHit
Then - Actions
Animation - Change AngryBird2[AngryBirdLoop] flying height to ((Current flying height of AngryBird2[AngryBirdLoop]) - AngryBirdFlySpeed) at 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird2[AngryBirdLoop]) Less than or equal to (AngryBirdsMinHeight + 5.00)
Then - Actions
Set AngryBird2AmountOfHits[AngryBirdLoop] = (AngryBird2AmountOfHits[AngryBirdLoop] + 1)
Special Effect - Create a special effect at AngryBirdp using AngryBirdSFX
Special Effect - Destroy (Last created special effect)
Set AngryBirdCollideGroup = (Units within AngryBirdsCollisionOnImpact of AngryBirdp)
Unit Group - Pick every unit in AngryBirdCollideGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of AngryBirdPlayer[AngryBirdLoop]) Equal to True
Then - Actions
Unit - Cause AngryBirdCaster[AngryBirdLoop] to damage (Picked unit), dealing AngryBirdDMG[AngryBirdLoop] damage of attack type AngryBirdAttackType and damage type AngryBirdDamageType
Else - Actions
Custom script: call DestroyGroup(udg_AngryBirdCollideGroup)
Set AngryBird2CooldownToHit[AngryBirdLoop] = 0.00
Set AngryBird2DistReqToCollide[AngryBirdLoop] = 0.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird2[AngryBirdLoop]) Less than AngryBirdsMaxHeight
Then - Actions
Animation - Change AngryBird2[AngryBirdLoop] flying height to ((Current flying height of AngryBird2[AngryBirdLoop]) + AngryBirdFlySpeed) at 0.00
Else - Actions
Custom script: call RemoveLocation(udg_AngryBirdp)
Custom script: call RemoveLocation(udg_AngryBirdTargetp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdRecall2[AngryBirdLoop] Equal to False
Then - Actions
Unit - Remove Angry Birds buff from AngryBirdTarget2[AngryBirdLoop]
Set AngryBirdTarget2[AngryBirdLoop] = No unit
Set AngryBirdHitInProgress2[AngryBirdLoop] = False
Set AngryBirdRecall2[AngryBirdLoop] = True
Else - Actions
Set AngryBirdp = (Position of AngryBird2[AngryBirdLoop])
Set AngryBirdTargetp = (Position of AngryBirdCaster[AngryBirdLoop])
Set AngryBird2Rotation[AngryBirdLoop] = (Angle from AngryBirdp to AngryBirdTargetp)
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdSpeed towards (Facing of AngryBird2[AngryBirdLoop]) degrees)
Unit - Move AngryBird2[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird2[AngryBirdLoop] face AngryBird2Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between AngryBirdp and AngryBirdTargetp) Greater than (AngryBirdsReturnRadius x 2.00)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird2[AngryBirdLoop]) Less than (AngryBirdsMaxHeight - 200.00)
Then - Actions
Animation - Change AngryBird2[AngryBirdLoop] flying height to ((Current flying height of AngryBird2[AngryBirdLoop]) + AngryBirdFlySpeed) at 0.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird2[AngryBirdLoop]) Less than or equal to AngryBirdsMinHeight
(Distance between AngryBirdp and AngryBirdTargetp) Less than AngryBirdsReturnRadius
Then - Actions
Set AngryBird2TimerTilRecall[AngryBirdLoop] = AngryBird2OriginalRecall[AngryBirdLoop]
Animation - Change AngryBird2[AngryBirdLoop] flying height to (Default flying height of AngryBird2[AngryBirdLoop]) at 0.00
Unit Group - Remove AngryBird2[AngryBirdLoop] from AngryBirdRunningGroup
Set AngryBird2AmountOfHits[AngryBirdLoop] = 0
Set AngryBirdRecall2[AngryBirdLoop] = False
Unit - Add AngryBirdDetectAbility to AngryBird2[AngryBirdLoop]
Set AngryBird1Rotation[AngryBirdLoop] = 90.00
Set AngryBird2Rotation[AngryBirdLoop] = 180.00
Set AngryBird3Rotation[AngryBirdLoop] = 270.00
Set AngryBird4Rotation[AngryBirdLoop] = 360.00
Else - Actions
Animation - Change AngryBird2[AngryBirdLoop] flying height to ((Current flying height of AngryBird2[AngryBirdLoop]) - AngryBirdFlySpeed) at 0.00
Custom script: call RemoveLocation(udg_AngryBirdp)
Custom script: call RemoveLocation(udg_AngryBirdTargetp)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird3[AngryBirdLoop] Not equal to No unit
AngryBirdHitInProgress3[AngryBirdLoop] Equal to False
AngryBirdRecall3[AngryBirdLoop] Equal to False
Then - Actions
Set AngryBirdp = (Position of AngryBirdCaster[AngryBirdLoop])
Set AngryBird3Rotation[AngryBirdLoop] = (AngryBird3Rotation[AngryBirdLoop] + AngryBirdAuraRotateSpeed)
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdDistFromHero towards AngryBird3Rotation[AngryBirdLoop] degrees)
Unit - Move AngryBird3[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird3[AngryBirdLoop] face AngryBird3Rotation[AngryBirdLoop] over 0.00 seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
Custom script: call RemoveLocation(udg_AngryBirdp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AngryBirdTarget3[AngryBirdLoop] is dead) Equal to True
Then - Actions
Set AngryBird3AmountOfHits[AngryBirdLoop] = AngryBird3MaxHitAmount[AngryBirdLoop]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdHitInProgress3[AngryBirdLoop] Equal to True
AngryBird3AmountOfHits[AngryBirdLoop] Less than AngryBird3MaxHitAmount[AngryBirdLoop]
Then - Actions
Set AngryBirdp = (Position of AngryBird3[AngryBirdLoop])
Set AngryBirdTargetp = (Position of AngryBirdTarget3[AngryBirdLoop])
Set AngryBird3Rotation[AngryBirdLoop] = (Angle from AngryBirdp to AngryBirdTargetp)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird3TimerTilRecall[AngryBirdLoop] Less than or equal to 0.00
Then - Actions
Set AngryBird3AmountOfHits[AngryBirdLoop] = AngryBird3MaxHitAmount[AngryBirdLoop]
Else - Actions
Set AngryBird3TimerTilRecall[AngryBirdLoop] = (AngryBird3TimerTilRecall[AngryBirdLoop] - AngryBirdMinusTimerSpeed)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird3CooldownToHit[AngryBirdLoop] Less than AngryBirdsMaxCooldownToHit
Then - Actions
Set AngryBird3CooldownToHit[AngryBirdLoop] = (AngryBird3CooldownToHit[AngryBirdLoop] + AngryBirdsCooldownSpeed)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between AngryBirdp and AngryBirdTargetp) Greater than AngryBird3DistReqToCollide[AngryBirdLoop]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird3[AngryBirdLoop]) Less than AngryBirdsMaxHeight
Then - Actions
Animation - Change AngryBird3[AngryBirdLoop] flying height to ((Current flying height of AngryBird3[AngryBirdLoop]) + (AngryBirdFlySpeed / 2.00)) at 0.00
Else - Actions
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdSpeed towards (Facing of AngryBird3[AngryBirdLoop]) degrees)
Unit - Move AngryBird3[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird3[AngryBirdLoop] face AngryBird3Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird3DistReqToCollide[AngryBirdLoop] Less than AngryBirdMaxCollisionRadius
Then - Actions
Set AngryBird3DistReqToCollide[AngryBirdLoop] = (AngryBird3DistReqToCollide[AngryBirdLoop] + AngryBirdsCollisionSpedBuildup)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird3[AngryBirdLoop]) Greater than 10.00
AngryBird3CooldownToHit[AngryBirdLoop] Greater than or equal to AngryBirdsMaxCooldownToHit
Then - Actions
Animation - Change AngryBird3[AngryBirdLoop] flying height to ((Current flying height of AngryBird3[AngryBirdLoop]) - AngryBirdFlySpeed) at 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird3[AngryBirdLoop]) Less than or equal to (AngryBirdsMinHeight + 5.00)
Then - Actions
Set AngryBird3AmountOfHits[AngryBirdLoop] = (AngryBird3AmountOfHits[AngryBirdLoop] + 1)
Special Effect - Create a special effect at AngryBirdp using AngryBirdSFX
Special Effect - Destroy (Last created special effect)
Set AngryBirdCollideGroup = (Units within AngryBirdsCollisionOnImpact of AngryBirdp)
Unit Group - Pick every unit in AngryBirdCollideGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of AngryBirdPlayer[AngryBirdLoop]) Equal to True
Then - Actions
Unit - Cause AngryBirdCaster[AngryBirdLoop] to damage (Picked unit), dealing AngryBirdDMG[AngryBirdLoop] damage of attack type AngryBirdAttackType and damage type AngryBirdDamageType
Else - Actions
Custom script: call DestroyGroup(udg_AngryBirdCollideGroup)
Set AngryBird3CooldownToHit[AngryBirdLoop] = 0.00
Set AngryBird3DistReqToCollide[AngryBirdLoop] = 0.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird3[AngryBirdLoop]) Less than AngryBirdsMaxHeight
Then - Actions
Animation - Change AngryBird3[AngryBirdLoop] flying height to ((Current flying height of AngryBird3[AngryBirdLoop]) + AngryBirdFlySpeed) at 0.00
Else - Actions
Custom script: call RemoveLocation(udg_AngryBirdp)
Custom script: call RemoveLocation(udg_AngryBirdTargetp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdRecall3[AngryBirdLoop] Equal to False
Then - Actions
Unit - Remove Angry Birds buff from AngryBirdTarget3[AngryBirdLoop]
Set AngryBirdTarget3[AngryBirdLoop] = No unit
Set AngryBirdHitInProgress3[AngryBirdLoop] = False
Set AngryBirdRecall3[AngryBirdLoop] = True
Else - Actions
Set AngryBirdp = (Position of AngryBird3[AngryBirdLoop])
Set AngryBirdTargetp = (Position of AngryBirdCaster[AngryBirdLoop])
Set AngryBird3Rotation[AngryBirdLoop] = (Angle from AngryBirdp to AngryBirdTargetp)
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdSpeed towards (Facing of AngryBird3[AngryBirdLoop]) degrees)
Unit - Move AngryBird3[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird3[AngryBirdLoop] face AngryBird3Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between AngryBirdp and AngryBirdTargetp) Greater than (AngryBirdsReturnRadius x 2.00)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird3[AngryBirdLoop]) Less than (AngryBirdsMaxHeight - 200.00)
Then - Actions
Animation - Change AngryBird3[AngryBirdLoop] flying height to ((Current flying height of AngryBird3[AngryBirdLoop]) + AngryBirdFlySpeed) at 0.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird3[AngryBirdLoop]) Less than or equal to AngryBirdsMinHeight
(Distance between AngryBirdp and AngryBirdTargetp) Less than AngryBirdsReturnRadius
Then - Actions
Set AngryBird3TimerTilRecall[AngryBirdLoop] = AngryBird3OriginalRecall[AngryBirdLoop]
Animation - Change AngryBird3[AngryBirdLoop] flying height to (Default flying height of AngryBird3[AngryBirdLoop]) at 0.00
Unit Group - Remove AngryBird3[AngryBirdLoop] from AngryBirdRunningGroup
Set AngryBird3AmountOfHits[AngryBirdLoop] = 0
Set AngryBirdRecall3[AngryBirdLoop] = False
Unit - Add AngryBirdDetectAbility to AngryBird3[AngryBirdLoop]
Set AngryBird1Rotation[AngryBirdLoop] = 90.00
Set AngryBird2Rotation[AngryBirdLoop] = 180.00
Set AngryBird3Rotation[AngryBirdLoop] = 270.00
Set AngryBird4Rotation[AngryBirdLoop] = 360.00
Else - Actions
Animation - Change AngryBird3[AngryBirdLoop] flying height to ((Current flying height of AngryBird3[AngryBirdLoop]) - AngryBirdFlySpeed) at 0.00
Custom script: call RemoveLocation(udg_AngryBirdp)
Custom script: call RemoveLocation(udg_AngryBirdTargetp)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird4[AngryBirdLoop] Not equal to No unit
AngryBirdHitInProgress4[AngryBirdLoop] Equal to False
AngryBirdRecall4[AngryBirdLoop] Equal to False
Then - Actions
Set AngryBirdp = (Position of AngryBirdCaster[AngryBirdLoop])
Set AngryBird4Rotation[AngryBirdLoop] = (AngryBird4Rotation[AngryBirdLoop] + AngryBirdAuraRotateSpeed)
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdDistFromHero towards AngryBird4Rotation[AngryBirdLoop] degrees)
Unit - Move AngryBird4[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird4[AngryBirdLoop] face AngryBird4Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
Custom script: call RemoveLocation(udg_AngryBirdp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AngryBirdTarget4[AngryBirdLoop] is dead) Equal to True
Then - Actions
Set AngryBird4AmountOfHits[AngryBirdLoop] = AngryBird4MaxHitAmount[AngryBirdLoop]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdHitInProgress4[AngryBirdLoop] Equal to True
AngryBird4AmountOfHits[AngryBirdLoop] Less than AngryBird4MaxHitAmount[AngryBirdLoop]
Then - Actions
Set AngryBirdp = (Position of AngryBird4[AngryBirdLoop])
Set AngryBirdTargetp = (Position of AngryBirdTarget4[AngryBirdLoop])
Set AngryBird4Rotation[AngryBirdLoop] = (Angle from AngryBirdp to AngryBirdTargetp)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird4TimerTilRecall[AngryBirdLoop] Less than or equal to 0.00
Then - Actions
Set AngryBird4AmountOfHits[AngryBirdLoop] = AngryBird4MaxHitAmount[AngryBirdLoop]
Else - Actions
Set AngryBird4TimerTilRecall[AngryBirdLoop] = (AngryBird4TimerTilRecall[AngryBirdLoop] - AngryBirdMinusTimerSpeed)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird4CooldownToHit[AngryBirdLoop] Less than AngryBirdsMaxCooldownToHit
Then - Actions
Set AngryBird4CooldownToHit[AngryBirdLoop] = (AngryBird4CooldownToHit[AngryBirdLoop] + AngryBirdsCooldownSpeed)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between AngryBirdp and AngryBirdTargetp) Greater than AngryBird4DistReqToCollide[AngryBirdLoop]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird4[AngryBirdLoop]) Less than AngryBirdsMaxHeight
Then - Actions
Animation - Change AngryBird4[AngryBirdLoop] flying height to ((Current flying height of AngryBird4[AngryBirdLoop]) + (AngryBirdFlySpeed / 2.00)) at 0.00
Else - Actions
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdSpeed towards (Facing of AngryBird4[AngryBirdLoop]) degrees)
Unit - Move AngryBird4[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird4[AngryBirdLoop] face AngryBird4Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird4DistReqToCollide[AngryBirdLoop] Less than AngryBirdMaxCollisionRadius
Then - Actions
Set AngryBird4DistReqToCollide[AngryBirdLoop] = (AngryBird4DistReqToCollide[AngryBirdLoop] + AngryBirdsCollisionSpedBuildup)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird4[AngryBirdLoop]) Greater than 10.00
AngryBird4CooldownToHit[AngryBirdLoop] Greater than or equal to AngryBirdsMaxCooldownToHit
Then - Actions
Animation - Change AngryBird4[AngryBirdLoop] flying height to ((Current flying height of AngryBird4[AngryBirdLoop]) - AngryBirdFlySpeed) at 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird4[AngryBirdLoop]) Less than or equal to (AngryBirdsMinHeight + 5.00)
Then - Actions
Set AngryBird4AmountOfHits[AngryBirdLoop] = (AngryBird4AmountOfHits[AngryBirdLoop] + 1)
Special Effect - Create a special effect at AngryBirdp using AngryBirdSFX
Special Effect - Destroy (Last created special effect)
Set AngryBirdCollideGroup = (Units within AngryBirdsCollisionOnImpact of AngryBirdp)
Unit Group - Pick every unit in AngryBirdCollideGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of AngryBirdPlayer[AngryBirdLoop]) Equal to True
Then - Actions
Unit - Cause AngryBirdCaster[AngryBirdLoop] to damage (Picked unit), dealing AngryBirdDMG[AngryBirdLoop] damage of attack type AngryBirdAttackType and damage type AngryBirdDamageType
Else - Actions
Custom script: call DestroyGroup(udg_AngryBirdCollideGroup)
Set AngryBird4CooldownToHit[AngryBirdLoop] = 0.00
Set AngryBird4DistReqToCollide[AngryBirdLoop] = 0.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird4[AngryBirdLoop]) Less than AngryBirdsMaxHeight
Then - Actions
Animation - Change AngryBird4[AngryBirdLoop] flying height to ((Current flying height of AngryBird4[AngryBirdLoop]) + AngryBirdFlySpeed) at 0.00
Else - Actions
Custom script: call RemoveLocation(udg_AngryBirdp)
Custom script: call RemoveLocation(udg_AngryBirdTargetp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdRecall4[AngryBirdLoop] Equal to False
Then - Actions
Unit - Remove Angry Birds buff from AngryBirdTarget4[AngryBirdLoop]
Set AngryBirdTarget4[AngryBirdLoop] = No unit
Set AngryBirdHitInProgress4[AngryBirdLoop] = False
Set AngryBirdRecall4[AngryBirdLoop] = True
Else - Actions
Set AngryBirdp = (Position of AngryBird4[AngryBirdLoop])
Set AngryBirdTargetp = (Position of AngryBirdCaster[AngryBirdLoop])
Set AngryBird4Rotation[AngryBirdLoop] = (Angle from AngryBirdp to AngryBirdTargetp)
Set AngryBirdp2 = (AngryBirdp offset by AngryBirdSpeed towards (Facing of AngryBird4[AngryBirdLoop]) degrees)
Unit - Move AngryBird4[AngryBirdLoop] instantly to AngryBirdp2
Unit - Make AngryBird4[AngryBirdLoop] face AngryBird4Rotation[AngryBirdLoop] over AngryBirdsTurningSpeed seconds
Custom script: call RemoveLocation(udg_AngryBirdp2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between AngryBirdp and AngryBirdTargetp) Greater than (AngryBirdsReturnRadius x 2.00)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird4[AngryBirdLoop]) Less than (AngryBirdsMaxHeight - 200.00)
Then - Actions
Animation - Change AngryBird4[AngryBirdLoop] flying height to ((Current flying height of AngryBird4[AngryBirdLoop]) + AngryBirdFlySpeed) at 0.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current flying height of AngryBird4[AngryBirdLoop]) Less than or equal to AngryBirdsMinHeight
(Distance between AngryBirdp and AngryBirdTargetp) Less than AngryBirdsReturnRadius
Then - Actions
Animation - Change AngryBird4[AngryBirdLoop] flying height to (Default flying height of AngryBird4[AngryBirdLoop]) at 0.00
Set AngryBird4TimerTilRecall[AngryBirdLoop] = AngryBird4OriginalRecall[AngryBirdLoop]
Unit Group - Remove AngryBird4[AngryBirdLoop] from AngryBirdRunningGroup
Set AngryBird4AmountOfHits[AngryBirdLoop] = 0
Set AngryBirdRecall4[AngryBirdLoop] = False
Unit - Add AngryBirdDetectAbility to AngryBird4[AngryBirdLoop]
Set AngryBird1Rotation[AngryBirdLoop] = 90.00
Set AngryBird2Rotation[AngryBirdLoop] = 180.00
Set AngryBird3Rotation[AngryBirdLoop] = 270.00
Set AngryBird4Rotation[AngryBirdLoop] = 360.00
Else - Actions
Animation - Change AngryBird4[AngryBirdLoop] flying height to ((Current flying height of AngryBird4[AngryBirdLoop]) - AngryBirdFlySpeed) at 0.00
Custom script: call RemoveLocation(udg_AngryBirdp)
Custom script: call RemoveLocation(udg_AngryBirdTargetp)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBirdIndex Equal to 0
Then - Actions
Countdown Timer - Pause AngryBirdsTimer
Trigger - Turn off (This trigger)
Else - Actions

[/trigger]



[trigger=]
Events
Game - GDD_Event becomes Equal to 0.00
Conditions
(Unit-type of GDD_DamageSource) Equal to AngryBirdDummy
(GDD_DamagedUnit has buff |c000080C0Angry Birds Aura|r ) Equal to True
(GDD_DamageSource is in AngryBirdRunningGroup) Not equal to True
Actions
Trigger - Turn off (This trigger)
Unit Group - Add GDD_DamageSource to AngryBirdRunningGroup
Unit - Remove AngryBirdDetectAbility from GDD_DamageSource
For each (Integer AngryBirdLoop3) from 1 to AngryBirdIndex, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird1[AngryBirdLoop3] Equal to GDD_DamageSource
Then - Actions
Set AngryBirdTarget1[AngryBirdLoop3] = GDD_DamagedUnit
Set AngryBirdHitInProgress1[AngryBirdLoop3] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird2[AngryBirdLoop3] Equal to GDD_DamageSource
Then - Actions
Set AngryBirdTarget2[AngryBirdLoop3] = GDD_DamagedUnit
Set AngryBirdHitInProgress2[AngryBirdLoop3] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird3[AngryBirdLoop3] Equal to GDD_DamageSource
Then - Actions
Set AngryBirdTarget3[AngryBirdLoop3] = GDD_DamagedUnit
Set AngryBirdHitInProgress3[AngryBirdLoop3] = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
AngryBird4[AngryBirdLoop3] Equal to GDD_DamageSource
Then - Actions
Set AngryBirdTarget4[AngryBirdLoop3] = GDD_DamagedUnit
Set AngryBirdHitInProgress4[AngryBirdLoop3] = True
Else - Actions
Trigger - Turn on (This trigger)

[/trigger]



Credits to weep for his GDD.

Keywords:
bird,fly,angry,3d,aura,spin,rotate,physics,dat,c3,-,tal,0,n,fun,epic,contest,entry
Contents

Best Aura-Spell Yet (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 15:58, 5th Jan 2015 Maker: The code could be better, shorter and cleaner. There are unnecessary actions.

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

15:58, 5th Jan 2015
Maker: The code could be better, shorter and cleaner.
There are unnecessary actions.
 
Reserved.

There is no option except the function call for the condition in the second trigger in vanilla.

Fair Warning the third trigger is massively awesome. I had to catch up with Tank afterall. =)
Sadly I didn't fully safety-proof it however nothing will go wrong unless you mess with the core/third trigger and have common sense to the common crashes.

Looking forward to comments.
 
That makes the code incredibly long... but okay. :cry:

Multi-instancing 4 instances for each caster could easily bug up too, figured it would be better to have a longer trigger.

I worked really hard this time so I understand how much of a pain it was to work with such a spell, I really did want to take the easy way out however I decided not too because sometimes the easy way isn't good.
 

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
Review emerges!

Codes & Triggers:

    • Do Multiple ActionsFor each (Integer AngryBirdLoop2) from 1 to AngryBirdIndex, do (Actions)
      • Loop - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Triggering unit) Equal to (==) AngryBirdCaster[AngryBirdLoop2]
          • Then - Actions
            • ...
    You can utilize capt. Bribe's GUI unit indexer to remove that fat, slow, bad, etc, etc loop.

    And..
    • -------- We catch every instance from 1 to 4 with this and create the rest of the start of the spell such as dummy unit creation and damage --------
    You are actually iterating all of the casters, not from 1 to 4 (if you meant birds)
  • Store (Level of AngryBirdAbility for (Triggering unit))s into a variable first. If you don't care about these micro-optimizations, you will never win a zephyr contest trust me :)
  • Here is the fixed version (using Bribe's UnitIndexer). Please take a look about everything I changed there:
    • AngryBirdActivator
      • Events
        • Unit - A unit Learns a skill
      • Conditions
        • (Learned Hero Skill) Equal to (==) Angry Birds Aura
      • Actions
        • -------- Configureable --------
        • -------- We check to make sure the hero is learning it for the first time so we only need to start one instance --------
        • Set AngryBirdTempLvl = (Level of AngryBirdAbility for (Triggering unit))
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AngryBirdTempLvl Equal to (==) 1
            • Then - Actions
              • -------- This starts the index or raises it so a new instance can be created --------
              • Set AngryBirdIndex = (AngryBirdIndex + 1)
              • Set AngryBirdTempInt = AngryBirdIndex
              • -------- This is how you catch the learning hero --------
              • Set AngryBirdCaster[AngryBirdIndex] = (Triggering unit)
              • Set AngryBirdCasterIndex[(Custom value of AngryBirdCaster[AngryBirdIndex])] = AngryBirdIndex
              • -------- This is adding a hidden ability so it'll show up as an aura in the status bar --------
              • Unit - Add AngryBirdBuffAbility to AngryBirdCaster[AngryBirdIndex]
              • -------- This identifies the owner of the hero and consumes less function calls --------
              • Set AngryBirdPlayer[AngryBirdIndex] = (Owner of AngryBirdCaster[AngryBirdIndex])
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • AngryBirdIndex Equal to (==) 1
                  • Then - Actions
                    • Countdown Timer - Start AngryBirdsTimer as a Repeating timer that will expire in AngryBirdsTimerSpeed seconds
                    • Trigger - Turn on AngryBirdLooper <gen>
                  • Else - Actions
            • Else - Actions
              • Set AngryBirdTempInt = AngryBirdCasterIndex[(Custom value of (Triggering unit))]
        • -------- This is the position of the learning hero --------
        • Set AngryBirdp = (Position of AngryBirdCaster[AngryBirdTempInt])
        • -------- This is how long birds can target once they're hovering over them --------
        • Set AngryBird1OriginalRecall[AngryBirdTempInt] = (20.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • Set AngryBird1TimerTilRecall[AngryBirdTempInt] = AngryBird1OriginalRecall[AngryBirdIndex]
        • Set AngryBird2OriginalRecall[AngryBirdTempInt] = (20.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • Set AngryBird2TimerTilRecall[AngryBirdTempInt] = AngryBird2OriginalRecall[AngryBirdIndex]
        • Set AngryBird3OriginalRecall[AngryBirdTempInt] = (20.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • Set AngryBird3TimerTilRecall[AngryBirdTempInt] = AngryBird3OriginalRecall[AngryBirdIndex]
        • Set AngryBird4OriginalRecall[AngryBirdTempInt] = (20.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • Set AngryBird4TimerTilRecall[AngryBirdTempInt] = AngryBird4OriginalRecall[AngryBirdIndex]
        • -------- --------
        • -------- This is how many times the birds will hit before returning to the hero --------
        • Set AngryBird1MaxHitAmount[AngryBirdTempInt] = (2 + (AngryBirdTempLvl x 3))
        • Set AngryBird2MaxHitAmount[AngryBirdTempInt] = (2 + (AngryBirdTempLvl x 3))
        • Set AngryBird3MaxHitAmount[AngryBirdTempInt] = (2 + (AngryBirdTempLvl x 3))
        • Set AngryBird4MaxHitAmount[AngryBirdTempInt] = (2 + (AngryBirdTempLvl x 3))
        • -------- --------
        • -------- This is where you configure damage when the birds fly down and slam the target --------
        • Set AngryBirdDMG[AngryBirdTempInt] = (10.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • -------- Dont touch beyond this comment --------
        • -------- Not Configureable Easily --------
        • -------- --------
        • -------- This is where we basically set up the aura such as creating each unit per level of the ability --------
        • -------- This ability will only work up to level 4 currently --------
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AngryBird1[AngryBirdTempInt] Equal to (==) No unit
            • Then - Actions
              • Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdTempInt] at AngryBirdp facing Default building facing (270.0) degrees
              • Set AngryBird1[AngryBirdTempInt] = (Last created unit)
            • Else - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AngryBird2[AngryBirdTempInt] Equal to (==) No unit
                • Then - Actions
                  • Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdTempInt] at AngryBirdp facing Default building facing (270.0) degrees
                  • Set AngryBird2[AngryBirdTempInt] = (Last created unit)
                • Else - Actions
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • AngryBird3[AngryBirdTempInt] Equal to (==) No unit
                    • Then - Actions
                      • Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdTempInt] at AngryBirdp facing Default building facing (270.0) degrees
                      • Set AngryBird3[AngryBirdTempInt] = (Last created unit)
                    • Else - Actions
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • AngryBird4[AngryBirdTempInt] Equal to (==) No unit
                        • Then - Actions
                          • Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdTempInt] at AngryBirdp facing Default building facing (270.0) degrees
                          • Set AngryBird4[AngryBirdTempInt] = (Last created unit)
                        • Else - Actions
        • Custom script: call RemoveLocation(udg_AngryBirdp)
        • -------- This is to set the rotations so they're not clumped together and so they look like an aura --------
        • Set AngryBird1Rotation[AngryBirdTempInt] = 90.00
        • Set AngryBird2Rotation[AngryBirdTempInt] = 180.00
        • Set AngryBird3Rotation[AngryBirdTempInt] = 270.00
        • Set AngryBird4Rotation[AngryBirdTempInt] = 360.00
        • -------- --------
        • -------- This is where we turn on the trigger that runs the entire system, don't want it to be left on consuming RAM when it isn't needed. --------
    In term of spell behavior, that trigger obviously could still be improved. Removing 4 birds limitation for example. You can use unit-group array variable to do this, in vJass you can simply use another struct/container.

  • You can keep this trigger turned on actually. Just pause/unpausing the timer is enough.

    • Multiple ConditionsOr - Any (Conditions) are true
      • Conditions
        • AngryBird1[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBird2[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBird3[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBird4[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBirdTarget1[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBirdTarget2[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBirdTarget3[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBirdTarget4[AngryBirdLoop] Not equal to (!=) No unit
    Uneeded condition.

    Also move this block to that block.
    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • AngryBirdIndex Equal to (==) 0
      • Then - Actions
        • Countdown Timer - Pause AngryBirdsTimer
        • Trigger - Turn off (This trigger)
      • Else - Actions
    => (Turn-off-trigger action is removed)
    • ...
    • Set AngryBirdCaster[AngryBirdLoop] = AngryBirdCaster[AngryBirdIndex]
    • Set AngryBirdCaster[AngryBirdIndex] = No unit
    • Set AngryBirdIndex = (AngryBirdIndex - 1)
    • Set AngryBirdLoop = (AngryBirdLoop - 1)
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AngryBirdIndex Equal to (==) 0
        • Then - Actions
          • Countdown Timer - Pause AngryBirdsTimer
        • Else - Actions
  • I think I don't need to continue reviewing this trigger, it needs some kind of re-construction to greatly reduce its size. Currently, it seems too over-weighted.


    • (GDD_DamagedUnit has buff |c000080C0Angry Birds Aura|r ) Equal to (==) True
    The buff should be added into configuration trigger.

Object Datas & Miscs:
  • The birds' movements are badly glitched if their targets are moving.
  • This spell is incompatible for non-hero units.
  • Spell is limited by maximum of 4 birds.

Overall:
Just needs update. Currently, I can't tell the overall. I will await for that re-constructions before giving a full code-review, currently it's not.

Rating of 0/5 and vote for needs fix.​
 
Review emerges!

Codes & Triggers:

    • Do Multiple ActionsFor each (Integer AngryBirdLoop2) from 1 to AngryBirdIndex, do (Actions)
      • Loop - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Triggering unit) Equal to (==) AngryBirdCaster[AngryBirdLoop2]
          • Then - Actions
            • ...
    You can utilize capt. Bribe's GUI unit indexer to remove that fat, slow, bad, etc, etc loop.

    And..
    • -------- We catch every instance from 1 to 4 with this and create the rest of the start of the spell such as dummy unit creation and damage --------
    You are actually iterating all of the casters, not from 1 to 4 (if you meant birds)
  • Store (Level of AngryBirdAbility for (Triggering unit))s into a variable first. If you don't care about these micro-optimizations, you will never win a zephyr contest trust me :)
  • Here is the fixed version (using Bribe's UnitIndexer). Please take a look about everything I changed there:
    • AngryBirdActivator
      • Events
        • Unit - A unit Learns a skill
      • Conditions
        • (Learned Hero Skill) Equal to (==) Angry Birds Aura
      • Actions
        • -------- Configureable --------
        • -------- We check to make sure the hero is learning it for the first time so we only need to start one instance --------
        • Set AngryBirdTempLvl = (Level of AngryBirdAbility for (Triggering unit))
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AngryBirdTempLvl Equal to (==) 1
            • Then - Actions
              • -------- This starts the index or raises it so a new instance can be created --------
              • Set AngryBirdIndex = (AngryBirdIndex + 1)
              • Set AngryBirdTempInt = AngryBirdIndex
              • -------- This is how you catch the learning hero --------
              • Set AngryBirdCaster[AngryBirdIndex] = (Triggering unit)
              • Set AngryBirdCasterIndex[(Custom value of AngryBirdCaster[AngryBirdIndex])] = AngryBirdIndex
              • -------- This is adding a hidden ability so it'll show up as an aura in the status bar --------
              • Unit - Add AngryBirdBuffAbility to AngryBirdCaster[AngryBirdIndex]
              • -------- This identifies the owner of the hero and consumes less function calls --------
              • Set AngryBirdPlayer[AngryBirdIndex] = (Owner of AngryBirdCaster[AngryBirdIndex])
                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • AngryBirdIndex Equal to (==) 1
                  • Then - Actions
                    • Countdown Timer - Start AngryBirdsTimer as a Repeating timer that will expire in AngryBirdsTimerSpeed seconds
                    • Trigger - Turn on AngryBirdLooper <gen>
                  • Else - Actions
            • Else - Actions
              • Set AngryBirdTempInt = AngryBirdCasterIndex[(Custom value of (Triggering unit))]
        • -------- This is the position of the learning hero --------
        • Set AngryBirdp = (Position of AngryBirdCaster[AngryBirdTempInt])
        • -------- This is how long birds can target once they're hovering over them --------
        • Set AngryBird1OriginalRecall[AngryBirdTempInt] = (20.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • Set AngryBird1TimerTilRecall[AngryBirdTempInt] = AngryBird1OriginalRecall[AngryBirdIndex]
        • Set AngryBird2OriginalRecall[AngryBirdTempInt] = (20.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • Set AngryBird2TimerTilRecall[AngryBirdTempInt] = AngryBird2OriginalRecall[AngryBirdIndex]
        • Set AngryBird3OriginalRecall[AngryBirdTempInt] = (20.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • Set AngryBird3TimerTilRecall[AngryBirdTempInt] = AngryBird3OriginalRecall[AngryBirdIndex]
        • Set AngryBird4OriginalRecall[AngryBirdTempInt] = (20.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • Set AngryBird4TimerTilRecall[AngryBirdTempInt] = AngryBird4OriginalRecall[AngryBirdIndex]
        • -------- --------
        • -------- This is how many times the birds will hit before returning to the hero --------
        • Set AngryBird1MaxHitAmount[AngryBirdTempInt] = (2 + (AngryBirdTempLvl x 3))
        • Set AngryBird2MaxHitAmount[AngryBirdTempInt] = (2 + (AngryBirdTempLvl x 3))
        • Set AngryBird3MaxHitAmount[AngryBirdTempInt] = (2 + (AngryBirdTempLvl x 3))
        • Set AngryBird4MaxHitAmount[AngryBirdTempInt] = (2 + (AngryBirdTempLvl x 3))
        • -------- --------
        • -------- This is where you configure damage when the birds fly down and slam the target --------
        • Set AngryBirdDMG[AngryBirdTempInt] = (10.00 + ((Real(AngryBirdTempLvl)) x 5.00))
        • -------- Dont touch beyond this comment --------
        • -------- Not Configureable Easily --------
        • -------- --------
        • -------- This is where we basically set up the aura such as creating each unit per level of the ability --------
        • -------- This ability will only work up to level 4 currently --------
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AngryBird1[AngryBirdTempInt] Equal to (==) No unit
            • Then - Actions
              • Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdTempInt] at AngryBirdp facing Default building facing (270.0) degrees
              • Set AngryBird1[AngryBirdTempInt] = (Last created unit)
            • Else - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AngryBird2[AngryBirdTempInt] Equal to (==) No unit
                • Then - Actions
                  • Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdTempInt] at AngryBirdp facing Default building facing (270.0) degrees
                  • Set AngryBird2[AngryBirdTempInt] = (Last created unit)
                • Else - Actions
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • AngryBird3[AngryBirdTempInt] Equal to (==) No unit
                    • Then - Actions
                      • Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdTempInt] at AngryBirdp facing Default building facing (270.0) degrees
                      • Set AngryBird3[AngryBirdTempInt] = (Last created unit)
                    • Else - Actions
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • AngryBird4[AngryBirdTempInt] Equal to (==) No unit
                        • Then - Actions
                          • Unit - Create 1 AngryBirdDummy for AngryBirdPlayer[AngryBirdTempInt] at AngryBirdp facing Default building facing (270.0) degrees
                          • Set AngryBird4[AngryBirdTempInt] = (Last created unit)
                        • Else - Actions
        • Custom script: call RemoveLocation(udg_AngryBirdp)
        • -------- This is to set the rotations so they're not clumped together and so they look like an aura --------
        • Set AngryBird1Rotation[AngryBirdTempInt] = 90.00
        • Set AngryBird2Rotation[AngryBirdTempInt] = 180.00
        • Set AngryBird3Rotation[AngryBirdTempInt] = 270.00
        • Set AngryBird4Rotation[AngryBirdTempInt] = 360.00
        • -------- --------
        • -------- This is where we turn on the trigger that runs the entire system, don't want it to be left on consuming RAM when it isn't needed. --------
    In term of spell behavior, that trigger obviously could still be improved. Removing 4 birds limitation for example. You can use unit-group array variable to do this, in vJass you can simply use another struct/container.

  • You can keep this trigger turned on actually. Just pause/unpausing the timer is enough.

    • Multiple ConditionsOr - Any (Conditions) are true
      • Conditions
        • AngryBird1[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBird2[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBird3[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBird4[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBirdTarget1[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBirdTarget2[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBirdTarget3[AngryBirdLoop] Not equal to (!=) No unit
        • AngryBirdTarget4[AngryBirdLoop] Not equal to (!=) No unit
    Uneeded condition.

    Also move this block to that block.
    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • AngryBirdIndex Equal to (==) 0
      • Then - Actions
        • Countdown Timer - Pause AngryBirdsTimer
        • Trigger - Turn off (This trigger)
      • Else - Actions
    => (Turn-off-trigger action is removed)
    • ...
    • Set AngryBirdCaster[AngryBirdLoop] = AngryBirdCaster[AngryBirdIndex]
    • Set AngryBirdCaster[AngryBirdIndex] = No unit
    • Set AngryBirdIndex = (AngryBirdIndex - 1)
    • Set AngryBirdLoop = (AngryBirdLoop - 1)
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AngryBirdIndex Equal to (==) 0
        • Then - Actions
          • Countdown Timer - Pause AngryBirdsTimer
        • Else - Actions
  • I think I don't need to continue reviewing this trigger, it needs some kind of re-construction to greatly reduce its size. Currently, it seems too over-weighted.


    • (GDD_DamagedUnit has buff |c000080C0Angry Birds Aura|r ) Equal to (==) True
    The buff should be added into configuration trigger.

Object Datas & Miscs:
  • The birds' movements are badly glitched if their targets are moving.
  • This spell is incompatible for non-hero units.
  • Spell is limited by maximum of 4 birds.

Overall:
Just needs update. Currently, I can't tell the overall. I will await for that re-constructions before giving a full code-review, currently it's not.

Rating of 0/5 and vote for needs fix.​

Thanks for the 1/5. Sadly you can't rate a 0 :grin:

It's a hero ability, obviously it won't be compatible with units.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
The code is a bit of a mess. It could be done better. You could use a hastable to identify the instance. You could use variables and loops in a better way.

For example array[id*4] = bird1, array[id*4+1] = bird2, array[id*4+2] = bird3, array[id*4+3] = bird4

Using that method with a hashtable and loops, the code would be shorter, more easily editable and easier to read.

I quite like the aura. It is a fun spell.
 
Top