- Joined
- Apr 9, 2004
- Messages
- 502
I don't know why, but in one of my spells using custom script, it seems not to want to load at all, saying there's something wrong with the .j file.
I don't get why this happened so i'll tell yuo everythign i did
1st i imported triggers from another map as templates
then i started making a new spell, and it was working fine, but i tried once after and all of a sudden, it stopped working and i have no idea why. If i take out the triggers for this new spell entirely then it works fine...here are the two triggers BTW.
Basically, it mimics that axe throw someone made a while back with a slight variation. From what i can tell, the only thing that keeps screwing it up is the custom script on the first trigger, but i'm confused about the second one.
There aren't any syntax errors, so why am i having this problem?
I don't get why this happened so i'll tell yuo everythign i did
1st i imported triggers from another map as templates
then i started making a new spell, and it was working fine, but i tried once after and all of a sudden, it stopped working and i have no idea why. If i take out the triggers for this new spell entirely then it works fine...here are the two triggers BTW.
Code:
Initiate Fan Toss
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Fan Toss
(Casting unit) Equal to WindEnchantress
Actions
Set FanTossCenterPoint = (Target point of ability being cast)
Set TrackWE_Point = (Position of WindEnchantress)
Set Fan_Right_Point_1 = (TrackWE_Point offset by (Square root(((Power(500.00, 2.00)) + (Power(250.00, 2.00))))) towards ((Angle from TrackWE_Point to FanTossCenterPoint) - (45.00 - (Acos((500.00 / (Square root(((Power(500.00, 2.00)) + (Power(250.00, 2.00)))))))))) degrees)
Set Fan_Left_Point_1 = (TrackWE_Point offset by (Square root(((Power(500.00, 2.00)) + (Power(250.00, 2.00))))) towards ((Angle from TrackWE_Point to FanTossCenterPoint) + (45.00 - (Acos((500.00 / (Square root(((Power(500.00, 2.00)) + (Power(250.00, 2.00)))))))))) degrees)
Unit - Create 1 Fan Missile Dummy for (Owner of WindEnchantress) at TrackWE_Point facing Default building facing degrees
Set FanLeft = (Last created unit)
Unit - Turn collision for FanLeft Off
Unit - Create 1 Fan Missile Dummy for (Owner of WindEnchantress) at TrackWE_Point facing Default building facing degrees
Set FanRight = (Last created unit)
Unit - Turn collision for FanRight Off
Set FanLeftAngle = ((Angle from TrackWE_Point to FanTossCenterPoint) - 45.00)
Set FanRightAngle = ((Angle from TrackWE_Point to FanTossCenterPoint) + 45.00)
Custom script: call RemoveLocation(udg_FanTossCenterPoint)
Custom script: call RemoveLocation(udg_TrackWEPoint)
Set FanTravel_DIST = 500.00
Set FanRotationCounter = 0.00
Trigger - Turn on Fan Movement <gen>
Fan Movement
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FanTravel_DIST Less than or equal to 0.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FanRotationCounter Greater than or equal to 261.00
Then - Actions
Set CurrentFanLeftPoint = ((Position of FanLeft) offset by 20.00 towards (Angle from (Position of FanLeft) to (Position of WindEnchantress)) degrees)
Unit - Move FanLeft instantly to CurrentFanLeftPoint, facing Default building facing degrees
Set CurrentFanRightPoint = ((Position of FanRight) offset by 20.00 towards (Angle from (Position of FanRight) to (Position of WindEnchantress)) degrees)
Unit - Move FanRight instantly to CurrentFanRightPoint, facing Default building facing degrees
Set TrackWE_Point = (Position of WindEnchantress)
Set PotentialTargetsFanLeft = (Units within 100.00 of CurrentFanLeftPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in SafeTargetsFanLeft) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit)
Unit Group - Pick every unit in PotentialTargetsFanLeft and do (Actions)
Loop - Actions
Unit - Cause WindEnchantress to damage (Picked unit), dealing (25.00 + (20.00 x (Real((Level of Fan Toss for WindEnchantress))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Remove (Picked unit) from PotentialTargetsFanLeft
Unit Group - Add (Picked unit) to SafeTargetsFanLeft
Set PotentialTargetsFanRight = (Units within 100.00 of CurrentFanRightPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in SafeTargetsFanRight) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit
Unit Group - Pick every unit in PotentialTargetsFanRight and do (Actions)
Loop - Actions
Unit - Cause WindEnchantress to damage (Picked unit), dealing (25.00 + (20.00 x (Real((Level of Fan Toss for WindEnchantress))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Remove (Picked unit) from PotentialTargetsFanRight
Unit Group - Add (Picked unit) to SafeTargetsFanRight
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between CurrentFanLeftPoint and TrackWE_Point) Less than or equal to 100.00
Then - Actions
Unit - Kill FanLeft
Unit - Remove FanLeft from the game
Unit - Kill FanRight
Unit - Remove FanRight from the game
Unit Group - Remove all units from PotentialTargetsFanLeft
Unit Group - Remove all units from PotentialTargetsFanRight
Unit Group - Remove all units from SafeTargetsFanLeft
Unit Group - Remove all units from SafeTargetsFanRight
Custom script: call RemoveLocation(udg_TrackWEPoint)
Custom script: call RemoveLocation(udg_CurrentFanLeftPoint)
Custom script: call RemoveLocation(udg_CurrentFanRightPoint)
Trigger - Turn off (This trigger)
Else - Actions
Do nothing
Custom script: call RemoveLocation(udg_TrackWEPoint)
Custom script: call RemoveLocation(udg_CurrentFanLeftPoint)
Custom script: call RemoveLocation(udg_CurrentFanRightPoint)
Else - Actions
Set FanRotationCounter = (FanRotationCounter + 3.00)
Set FanAngle = (UniversalFanAngle + FanRotationCounter)
Set CurrentFanLeftPoint = (Fan_Left_Point_1 offset by 250.00 towards FanAngle degrees)
Unit - Move FanLeft instantly to CurrentFanLeftPoint, facing Default building facing degrees
Set CurrentFanRightPoint = (Fan_Right_Point_1 offset by 250.00 towards (-1.00 x FanAngle) degrees)
Unit - Move FanRight instantly to CurrentFanRightPoint, facing Default building facing degrees
Set PotentialTargetsFanLeft = (Units within 100.00 of CurrentFanLeftPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in SafeTargetsFanLeft) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit)
Unit Group - Pick every unit in PotentialTargetsFanLeft and do (Actions)
Loop - Actions
Unit - Cause WindEnchantress to damage (Picked unit), dealing (25.00 + (20.00 x (Real((Level of Fan Toss for WindEnchantress))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Remove (Picked unit) from PotentialTargetsFanLeft
Unit Group - Add (Picked unit) to SafeTargetsFanLeft
Set PotentialTargetsFanRight = (Units within 100.00 of CurrentFanRightPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in SafeTargetsFanRight) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit
Unit Group - Pick every unit in PotentialTargetsFanRight and do (Actions)
Loop - Actions
Unit - Cause WindEnchantress to damage (Picked unit), dealing (25.00 + (20.00 x (Real((Level of Fan Toss for WindEnchantress))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Remove (Picked unit) from PotentialTargetsFanRight
Unit Group - Add (Picked unit) to SafeTargetsFanRight
Custom script: call RemoveLocation(udg_CurrentFanLeftPoint)
Custom script: call RemoveLocation(udg_CurrentFanRightPoint)
Else - Actions
Set CurrentFanLeftPoint = ((Position of FanLeft) offset by 10.00 towards FanLeftAngle degrees)
Set CurrentFanRightPoint = ((Position of FanRight) offset by 10.00 towards FanRightAngle degrees)
Set FanTravel_DIST = (FanTravel_DIST - 10.00)
Unit - Move FanLeft instantly to CurrentFanLeftPoint, facing Default building facing degrees
Unit - Move FanRight instantly to CurrentFanRightPoint, facing Default building facing degrees
Set PotentialTargetsFanLeft = (Units within 100.00 of CurrentFanLeftPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in SafeTargetsFanLeft) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit)
Unit Group - Pick every unit in PotentialTargetsFanLeft and do (Actions)
Loop - Actions
Unit - Cause WindEnchantress to damage (Picked unit), dealing (25.00 + (20.00 x (Real((Level of Fan Toss for WindEnchantress))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Remove (Picked unit) from PotentialTargetsFanLeft
Unit Group - Add (Picked unit) to SafeTargetsFanLeft
Set PotentialTargetsFanRight = (Units within 100.00 of CurrentFanRightPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in SafeTargetsFanRight) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit
Unit Group - Pick every unit in PotentialTargetsFanRight and do (Actions)
Loop - Actions
Unit - Cause WindEnchantress to damage (Picked unit), dealing (25.00 + (20.00 x (Real((Level of Fan Toss for WindEnchantress))))) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
Special Effect - Destroy (Last created special effect)
Unit Group - Remove (Picked unit) from PotentialTargetsFanRight
Unit Group - Add (Picked unit) to SafeTargetsFanRight
Set UniversalFanAngle = (Angle from Fan_Left_Point_1 to (Position of FanLeft))
Custom script: call RemoveLocation(udg_CurrentFanLeftPoint)
Custom script: call RemoveLocation(udg_CurrentFanRightPoint)
Basically, it mimics that axe throw someone made a while back with a slight variation. From what i can tell, the only thing that keeps screwing it up is the custom script on the first trigger, but i'm confused about the second one.
There aren't any syntax errors, so why am i having this problem?