I am using variables for all units (caster and target), I don't know what you mean with this.
They are in the "
Dive Attack start" trigger. It's explained in the map as well, and there is a comment showing which variables can be edited. Duration, speed, and cooldown have to be there because they are indexed. I could move damage, heal and speed multiplier to map init, but then the changable variables would be in 2 different locations, which I didn't want.
-
Dive Attack start
-
Events
-
Unit - A unit Is attacked
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
(Level of Dive Attack for (Attacking unit)) Greater than 0
-
((Attacking unit) is Snared) Equal to False
-
Actions
-
-------- Fixed variables, do not change these. --------
-
Set DiveAttackIndex = (DiveAttackIndex + 1)
-
Set DiveAttackCaster[DiveAttackIndex] = (Attacking unit)
-
Set DiveAttackTarget[DiveAttackIndex] = (Attacked unit)
-
Set DiveAttackHeight[DiveAttackIndex] = (Default flying height of DiveAttackCaster[DiveAttackIndex])
-
Set DiveAttackCanceled[DiveAttackIndex] = False
-
Set DiveAttackState[DiveAttackIndex] = 1
-
-------- Other variabes, change values as you will. --------
-
Set DiveAttackDamage = 10.00 // damage
-
Set DiveAttackHeal = 10.00 // heal
-
Set DiveAttackMaxDur[DiveAttackIndex] = 3.00 // max chase duration before the bird gives up
-
Set DiveAttackCooldownTimer[DiveAttackIndex] = (Random real number between 0.80 and 1.20) // attack cooldown
-
Set DiveAttackSpeed[DiveAttackIndex] = (Current movement speed of DiveAttackCaster[DiveAttackIndex]) // dive speed (set to a fixed value if you want)
-
Set DiveAttackSpeedMultiplier = 1.50// dive speed multiplier (if you use a fixed speed for the above value, set this to 1)