- Joined
- Aug 20, 2009
- Messages
- 1,554
i used this custom script.
now the trigger can't be enabled.
i copied this from another map ,and paste it, i only change the variable name into the one i am using right now.
i got TempPoint5 in my variable list.
i dont think it actually will be a problem.
here is my full trigger.
it is just a test. there are leaks, but no worries, i will spot it.
-
Custom script: if IsLocPathable(udg_TempPoint5) == true then
now the trigger can't be enabled.
i copied this from another map ,and paste it, i only change the variable name into the one i am using right now.
i got TempPoint5 in my variable list.
i dont think it actually will be a problem.
here is my full trigger.
it is just a test. there are leaks, but no worries, i will spot it.
-
Laser System PathLocDetector
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(MissileGroup is empty) Equal to False
-
-
Then - Actions
-
Unit Group - Pick every unit in MissileGroup and do (Actions)
-
Loop - Actions
-
Set LaserSpeed = 45.00
-
Set LaserDamage = (4.00 x (Real((Level of LaserDamage for MissileTempUnit))))
-
Set MissileTempUnit = (Picked unit)
-
Set LaserOwner = (Player number of (Owner of MissileTempUnit))
-
Set TempPoint4 = (Position of MissileTempUnit)
-
Set TempPoint5 = (TempPoint4 offset by LaserSpeed towards (Facing of MissileTempUnit) degrees)
-
Set LaserFinalLoc = (Point-value of MissileTempUnit)
-
Custom script: if IsLocPathable(udg_TempPoint5) == true then
-
Set x = (X of TempPoint5)
-
Set y = (Y of TempPoint5)
-
Custom script: call SetUnitX(udg_MissileTempUnit, udg_x)
-
Custom script: call SetUnitY(udg_MissileTempUnit, udg_y)
-
Unit - Set the custom value of MissileTempUnit to ((Custom value of MissileTempUnit) + (Integer(LaserSpeed)))
-
Custom script: else
-
Set LaserFinalLoc = (Custom value of MissileTempUnit)
-
Custom script: endif
-
Unit Group - Pick every unit in (Units within 90.00 of (Position of MissileTempUnit)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is An Ancient) Equal to False
-
((Picked unit) is Magic Immune) Equal to False
-
((Picked unit) is alive) Equal to True
-
((Picked unit) belongs to an enemy of (Owner of MissileTempUnit)) Equal to True
-
(Unit-type of (Picked unit)) Not equal to Laser Dummy
-
(Unit-type of (Picked unit)) Not equal to Dummy (fly)
-
(Unit-type of (Picked unit)) Not equal to Dummy 90 degrees (fly)
-
-
Then - Actions
-
Set TempPoint = (Position of (Picked unit))
-
Unit - Cause MissileTempUnit to damage (Picked unit), dealing LaserDamage damage of attack type Spells and damage type Normal
-
Special Effect - Create a special effect at TempPoint using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_TempPoint)
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Custom value of MissileTempUnit) Greater than or equal to LaserFinalLoc
-
(Terrain pathing at TempPoint5 of type Walkability is off) Equal to True
-
(Terrain pathing at TempPoint5 of type Walkability is off) Equal to True
-
(Terrain pathing at TempPoint5 of type Flyability is off) Equal to True
-
-
-
-
Then - Actions
-
Unit - Create 1 Dummy (fly) for (Owner of MissileTempUnit) at TempPoint4 facing Default building facing degrees
-
Set FinalDistanceRay[LaserOwner] = (Position of (Last created unit))
-
Animation - Change (Last created unit)'s size to (200.00%, 200.00%, 200.00%) of its original size
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Weapons\LordofFlameMissile\LordofFlameMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit Group - Remove MissileTempUnit from MissileGroup
-
Unit - Add a 0.01 second Generic expiration timer to MissileTempUnit
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_TempPoint4)
-
Custom script: call RemoveLocation(udg_TempPoint5)
-
-
-
-
Else - Actions
-
Trigger - Turn off (This trigger)
-
-
-
-
Last edited: