- Joined
- Sep 6, 2012
- Messages
- 88
Hi everyone !
Currently I'm making an ability that fires a projectile that travels pretty far. For each ally unit it meets on its way, the projectile power is increased a bit. The trigger below shows how I did this.
Thank you very much !
P/S: I'm aware of leaks and they're not the main concern at the moment, so let's ignore them for now
!
Currently I'm making an ability that fires a projectile that travels pretty far. For each ally unit it meets on its way, the projectile power is increased a bit. The trigger below shows how I did this.
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
(Unit-type of EmpoweredArrow_ArrowUnit) Equal to Empowered Arrow
-
-
Actions
-
Set Temp_Point = (Position of EmpoweredArrow_ArrowUnit)
-
Set Temp_Point_2 = (Temp_Point offset by 30.00 towards EmpoweredArrow_FacingAngle degrees)
-
Unit - Move EmpoweredArrow_ArrowUnit instantly to Temp_Point_2, facing EmpoweredArrow_FacingAngle degrees
-
Set EmpoweredArrow_TargetGroup = (Units within 100.00 of Temp_Point matching (((((Matching unit) Not equal to EmpoweredArrow_ArrowOwner) and ((((Matching unit) belongs to an ally of (Owner of EmpoweredArrow_ArrowUnit)) Equal to True) and (((Matching unit) is in EmpoweredArrow_TargetGroupUsed
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(EmpoweredArrow_TargetGroup is empty) Equal to False
-
-
Then - Actions
-
Unit Group - Pick every unit in EmpoweredArrow_TargetGroup and do (Actions)
-
Loop - Actions
-
Set EmpoweredArrow_BaseDamage = (EmpoweredArrow_BaseDamage + EmpoweredArrow_DamageStep)
-
Unit Group - Add (Picked unit) to EmpoweredArrow_TargetGroupUsed
-
-
-
Custom script: call DestroyGroup (udg_EmpoweredArrow_TargetGroup)
-
-
Else - Actions
-
-
Thank you very much !
P/S: I'm aware of leaks and they're not the main concern at the moment, so let's ignore them for now