So I have a trigger here:
My question is: is there any other way to do what I want to do here without creating 1 "fozenOrbMove" trigger for each person? I'm having a mental block thinking of anything creative.
Thanks!
-
frozenOrbCast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Frozen Orb (Frost Mage)
-
-
Actions
-
Set VariableSet frozenOrbCaster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
-
Set VariableSet frozenOrbPlayerNum = (Player number of (Owner of (Triggering unit)))
-
Set VariableSet frozenOrbCastPoint[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
-
Set VariableSet frozenOrbCasterLoc[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
-
Set VariableSet frozenOrbDistance[(Player number of (Owner of (Triggering unit)))] = (Distance between frozenOrbCasterLoc[(Player number of (Owner of (Triggering unit)))] and frozenOrbCastPoint[(Player number of (Owner of (Triggering unit)))])
-
Set VariableSet frozenOrbInt[(Player number of (Owner of (Triggering unit)))] = 0
-
Unit - Create 1 Frozen Orb (Frost Mage) for (Owner of (Triggering unit)) at frozenOrbCasterLoc[(Player number of (Owner of (Triggering unit)))] facing frozenOrbCastPoint[(Player number of (Owner of (Triggering unit)))]
-
Set VariableSet frozenOrbUnit[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
-
Set VariableSet frozenOrbDamageIntelligence[(Player number of (Owner of (Triggering unit)))] = (Real((Unit: (Triggering unit)'s Integer Field: Intelligence (with Bonus) ('uinb'))))
-
Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
-
Trigger - Turn on frozenOrbDamage <gen>
-
Trigger - Turn on frozenOrbMove <gen>
-
-
-
frozenOrbMove
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
frozenOrbInt[(Player number of (Owner of (Triggering unit)))] Less than or equal to 100
-
-
Then - Actions
-
Unit - Move frozenOrbUnit[(Player number of (Owner of (Triggering unit)))] instantly to (frozenOrbCasterLoc[(Player number of (Owner of (Triggering unit)))] offset by ((frozenOrbDistance[(Player number of (Owner of (Triggering unit)))] / 100.00) x (Real(frozenOrbInt[(Player number of (Owner of (Triggering unit)))]))) towards (Facing of frozenOrb
-
Set VariableSet frozenOrbInt[(Player number of (Owner of (Triggering unit)))] = (frozenOrbInt[(Player number of (Owner of (Triggering unit)))] + 1)
-
-
Else - Actions
-
Custom script: call RemoveLocation(udg_frozenOrbCastPoint[udg_frozenOrbPlayerNum])
-
Custom script: call RemoveLocation(udg_frozenOrbCasterLoc[udg_frozenOrbPlayerNum])
-
Trigger - Turn off (This trigger)
-
-
-
-
My question is: is there any other way to do what I want to do here without creating 1 "fozenOrbMove" trigger for each person? I'm having a mental block thinking of anything creative.
Thanks!