- Joined
- Nov 3, 2005
- Messages
- 103
Yo's. Got these triggers that're causing me crazy lag so I started looking into how to fix them with custom lines of scripts.
Here's one of em:
Alright so I understand you have to call a line after each point within the trigger.
My question is would I have to create a separate temp variable for each ability, and would I have to call Integer A at the end of each of the custom script lines?
Custom script: call RemoveLocation (udg_Temp_Point)
Also, how would something like this look when coding for Integer A, if I had to?
Here's one of em:
Code:
HH Step Lions Fang
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ability_LionsFang_TimeFrozen[(Integer A)] Greater than 0.00
Then - Actions
Set Ability_LionsFang_TimeFrozen[(Integer A)] = (Ability_LionsFang_TimeFrozen[(Integer A)] - 1.00)
Else - Actions
Set Ability_LionsFang_Frozen[(Integer A)] = 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ability_LionsFang_Value[(Integer A)] Greater than or equal to 0.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ability_LionsFang_Frozen[(Integer A)] Equal to 0.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ability_LionsFang_Value[(Integer A)] Greater than 0.00
Then - Actions
Unit - Move Ability_LionsFang_Dummy[(Integer A)] instantly to ((Position of Ability_LionsFang_Dummy[(Integer A)]) offset by 35.00 towards Ability_LionsFang_Angle[(Integer A)] degrees)
Set Ability_LionsFang_Value[(Integer A)] = (Ability_LionsFang_Value[(Integer A)] - 1.00)
Unit Group - Pick every unit in (Units within 150.00 of (Position of Ability_LionsFang_Dummy[(Integer A)])) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Picked unit) belongs to an enemy of (Owner of Ability_LionsFang_Dummy[(Integer A)])) Equal to True
((Picked unit) is in Ability_LionsFang_Group[(Integer A)]) Equal to False
((Picked unit) is alive) Equal to True
((Picked unit) is A flying unit) Equal to False
Then - Actions
Set Ability_LionsFang_Frozen[(Integer A)] = 1.00
Set Ability_LionsFang_TimeFrozen[(Integer A)] = 3.00
Unit Group - Add (Picked unit) to Ability_LionsFang_Group[(Integer A)]
Unit - Cause HonorHero_Lothar[(Integer A)] to damage (Picked unit), dealing (35.00 + (Random real number between 0.00 and 5.00)) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\WingedSerpentMissile\WingedSerpentMissile.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\WingedSerpentMissile\WingedSerpentMissile.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at (Position of Ability_LionsFang_Dummy[(Integer A)]) using Abilities\Weapons\WingedSerpentMissile\WingedSerpentMissile.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Do nothing
Else - Actions
Unit - Kill Ability_LionsFang_Dummy[(Integer A)]
Else - Actions
Do nothing
Else - Actions
Do nothing
Alright so I understand you have to call a line after each point within the trigger.
My question is would I have to create a separate temp variable for each ability, and would I have to call Integer A at the end of each of the custom script lines?
Custom script: call RemoveLocation (udg_Temp_Point)
Also, how would something like this look when coding for Integer A, if I had to?
Last edited: