I have this trigger for an ability in my game:
Near the bottom, there is a custom script. It is suppose to clear the memory leak that "AirStrikePoint" creates. Since, I have no knowledge of jass or custom script, how do I reference the (Player Number (Owner of (Triggering Unit)))?
-
Air Raid Improved
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Air Strike (New)
-
-

Actions
-


Set AirStrikeUnit[(Player number of (Owner of (Triggering unit)))] = (Casting unit)
-


Set AirStrikePoint[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
-


Set TempPoint2 = (AirStrikePoint[(Player number of (Owner of (Triggering unit)))] offset by (-800.00, -800.00))
-


Unit - Create 1 Helicopter for (Owner of (Triggering unit)) at AirStrikePoint[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
-


Set AirStrikeCopter[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
-


Unit - Order (Last created unit) to Move To TempPoint2
-


Animation - Change (Last created unit) flying height to 1000.00 at 200.00
-


Unit - Create 1 Bomb for (Owner of (Triggering unit)) at AirStrikePoint[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
-


Set AirStrikeBomb[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
-


Animation - Change (Last created unit) flying height to 25.00 at 91.66
-


Custom script: call RemoveLocation (udg_TempPoint2)
-


Sound - Play AirStrikeLaunch <gen> at 90.00% volume, located at AirStrikePoint[(Player number of (Owner of (Triggering unit)))] with Z offset 0.00
-


Wait for (Last played sound) to be 1.50 seconds from finished playing
-


Set TempUnitGroup = (Units within 225.00 of AirStrikePoint[(Player number of (Owner of (Triggering unit)))] matching (((Matching unit) belongs to an enemy of (Owner of AirStrikeUnit[(Player number of (Owner of (Triggering unit)))])) Equal to True))
-


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



Loop - Actions
-




Unit - Cause AirStrikeUnit[(Player number of (Owner of (Triggering unit)))] to damage (Picked unit), dealing 225.00 damage of attack type Spells and damage type Normal
-
-
-


Custom script: call DestroyGroup (udg_TempUnitGroup)
-


Unit - Remove AirStrikeBomb[(Player number of (Owner of (Triggering unit)))] from the game
-


Sound - Play AirStrikeExplosion <gen> at 90.00% volume, located at AirStrikePoint[(Player number of (Owner of (Triggering unit)))] with Z offset 0.00
-


Special Effect - Create a special effect at AirStrikePoint[(Player number of (Owner of (Triggering unit)))] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
-


Special Effect - Destroy (Last created special effect)
-


Custom script: call RemoveLocation (udg_AirStrikePoint[1])
-


Wait 2.00 seconds
-


Unit - Remove AirStrikeCopter[(Player number of (Owner of (Triggering unit)))] from the game
-
-
Last edited:



