sentrywiz
S
sentrywiz
This is the third time I make a thread about this. Its basically the same problem. My two other threads:
http://www.hiveworkshop.com/forums/triggers-scripts-269/leaks-i-cant-see-find-253539/
And
http://www.hiveworkshop.com/forums/triggers-scripts-269/map-huge-lag-cant-find-issue-253481/#post2542720
So I couldn't fix the issue in the last map. So I was like okay, fck it.
Then at some later date, I started a new map and remade the trigger, but I split it into multiple triggers, thinking that was the problem.
NOPE!
The same thing is back to haunt my dreams again.
-
Fire Shot
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Fire Shot
-
Actions
- Set Total_Shots = (Total_Shots + 1)
- Set Shot_Loc = (Position of (Casting unit))
- Set Shot_Loc2 = (Shot_Loc offset by 50.00 towards (Facing of (Casting unit)) degrees)
- Set Shot_Target_Loc[(Player number of (Owner of (Casting unit)))] = (Target point of ability being cast)
- Set Shot_Owner[(Player number of (Owner of (Casting unit)))] = (Casting unit)
- Unit - Create 1 Basic Shot for (Owner of (Casting unit)) at Shot_Loc2 facing (Facing of (Casting unit)) degrees
- Unit Group - Add (Last created unit) to Shots_Group
- Trigger - Turn on Move Shot <gen>
- Custom script: call RemoveLocation ( udg_Shot_Loc )
- Custom script: call RemoveLocation ( udg_Shot_Loc2 )
- Custom script: call RemoveLocation (udg_Shot_Target_Loc[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
-
Events
-
Move Shot
-
Events
- Time - Every 0.04 seconds of game time
-
Conditions
- Total_Shots Greater than 0
-
Actions
- Set Shots_Damage_Group = (Units within PLAYER_SHOTAREA[(Player number of (Owner of (Picked unit)))] of Shots_Move_Loc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True)))
-
Unit Group - Pick every unit in Shots_Group and do (Actions)
-
Loop - Actions
- Set Shots_Move_Loc = (Position of (Picked unit))
- Set Shots_Move_Loc2 = (Shots_Move_Loc offset by PLAYER_SHOTSPEED[(Player number of (Owner of (Picked unit)))] towards (Facing of (Picked unit)) degrees)
- Set Shots_Hit_Loc = (Units within PLAYER_SHOTAREA[(Player number of (Owner of (Picked unit)))] of Shots_Move_Loc matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Shots_Hit_Loc) Greater than 0
-
Then - Actions
- Trigger - Run Damage Target <gen> (ignoring conditions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Shot_Travel_Range[(Player number of (Owner of (Picked unit)))] Less than PLAYER_SHOTRANGE[(Player number of (Owner of (Picked unit)))]
-
Then - Actions
- Set Shot_Travel_Range[(Player number of (Owner of (Picked unit)))] = (Shot_Travel_Range[(Player number of (Owner of (Picked unit)))] + PLAYER_SHOTSPEED[(Player number of (Owner of (Picked unit)))])
- Unit - Move (Picked unit) instantly to Shots_Move_Loc2, facing (Facing of (Picked unit)) degrees
-
Else - Actions
- Unit - Remove (Picked unit) from the game
- Set Shot_Travel_Range[(Player number of (Owner of (Picked unit)))] = 0.00
- Set Total_Shots = (Total_Shots - 1)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Custom script: call DestroyGroup ( udg_Shots_Hit_Loc )
- Custom script: call RemoveLocation ( udg_Shots_Move_Loc )
- Custom script: call RemoveLocation ( udg_Shots_Move_Loc2 )
-
Loop - Actions
- Custom script: call DestroyGroup ( udg_Shots_Damage_Group )
-
Events
-
Damage Target
- Events
- Conditions
-
Actions
- Set Shot_Player = (Random unit from Shots_Hit_Loc)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Shot_Player has buff Evade ) Not equal to True
- PLAYER_RESISTSHOT[(Player number of (Owner of Shot_Player))] Less than 3
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_SHOTCRIT[(Player number of (Owner of (Picked unit)))] Greater than 0.00
- (Random integer number between 1 and 10) Less than or equal to 2
-
Then - Actions
- Set Calc_Damage = (PLAYER_SHOTDAMAGE[(Player number of (Owner of (Picked unit)))] - (PLAYER_DAMAGERED[(Player number of (Owner of Shot_Player))] x PLAYER_SHOTDAMAGE[(Player number of (Owner of (Picked unit)))]))
- Set Calc_Damage = (Calc_Damage x 2.00)
- Unit - Cause (Picked unit) to damage (Random unit from Shots_Hit_Loc), dealing Calc_Damage damage of attack type Chaos and damage type Universal
- Floating Text - Create floating text that reads (String((Integer(Calc_Damage)))) above Shot_Player with Z offset 0.00, using font size 14.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_LIFESTEAL[(Player number of (Owner of (Picked unit)))] Greater than 0.00
-
Then - Actions
- Set Calc_Lifesteal = (Calc_Damage x PLAYER_LIFESTEAL[(Player number of (Owner of (Picked unit)))])
- Unit - Set life of Shot_Owner[(Player number of (Owner of (Picked unit)))] to ((Life of Shot_Owner[(Player number of (Owner of (Picked unit)))]) + Calc_Lifesteal)
- Else - Actions
-
If - Conditions
-
Else - Actions
- Set Calc_Damage = (PLAYER_SHOTDAMAGE[(Player number of (Owner of (Picked unit)))] - (PLAYER_DAMAGERED[(Player number of (Owner of Shot_Player))] x PLAYER_SHOTDAMAGE[(Player number of (Owner of (Picked unit)))]))
- Unit - Cause (Picked unit) to damage (Random unit from Shots_Hit_Loc), dealing Calc_Damage damage of attack type Chaos and damage type Universal
- Floating Text - Create floating text that reads (String((Integer(Calc_Damage)))) above Shot_Player with Z offset 0.00, using font size 10.00, color (100.00%, 10.00%, 10.00%), and 0.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_LIFESTEAL[(Player number of (Owner of (Picked unit)))] Greater than 0.00
-
Then - Actions
- Set Calc_Lifesteal = (Calc_Damage x PLAYER_LIFESTEAL[(Player number of (Owner of (Picked unit)))])
- Unit - Set life of Shot_Owner[(Player number of (Owner of (Picked unit)))] to ((Life of Shot_Owner[(Player number of (Owner of (Picked unit)))]) + Calc_Lifesteal)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_AREALVL[(Player number of (Owner of (Picked unit)))] Greater than or equal to 1
-
Then - Actions
- Set burn_loc = (Position of (Picked unit))
- Unit - Create 1 Burning Area for (Owner of (Picked unit)) at burn_loc facing Default building facing degrees
- Unit - Add a 7.00 second Generic expiration timer to (Last created unit)
- Animation - Play (Last created unit)'s Stand Medium animation
- Special Effect - Create a special effect at burn_loc using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation ( udg_burn_loc )
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_RESISTSHOT[(Player number of (Owner of Shot_Player))] Less than 3
-
Then - Actions
- Set PLAYER_RESISTSHOT[(Player number of (Owner of Shot_Player))] = (PLAYER_RESISTSHOT[(Player number of (Owner of Shot_Player))] + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_BURNLVL[(Player number of (Owner of (Picked unit)))] Greater than 0
-
Then - Actions
- Set Cast_Loc = (Position of (Picked unit))
- Unit - Create 1 Dummy Cast for (Owner of (Picked unit)) at Cast_Loc facing Default building facing degrees
- Set Dummy_Unit = (Last created unit)
- Unit - Add a 3.00 second Generic expiration timer to Dummy_Unit
- Unit - Add Bottle of Napalm to Dummy_Unit
- Unit - Set level of Bottle of Napalm for Dummy_Unit to PLAYER_BURNLVL[(Player number of (Owner of (Picked unit)))]
- Unit - Order Dummy_Unit to Undead Necromancer - Unholy Frenzy Shot_Player
- Custom script: call RemoveLocation ( udg_Cast_Loc )
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_REVEALTARG[(Player number of (Owner of (Picked unit)))] Greater than 0
-
Then - Actions
- Set Cast_Loc = (Position of (Picked unit))
- Unit - Create 1 Dummy Cast for (Owner of (Picked unit)) at Cast_Loc facing Default building facing degrees
- Set Dummy_Unit = (Last created unit)
- Unit - Add a 3.00 second Generic expiration timer to Dummy_Unit
- Unit - Add Sniper Scope Reveal to Dummy_Unit
- Unit - Order Dummy_Unit to Night Elf Druid Of The Talon - Faerie Fire Shot_Player
- Custom script: call RemoveLocation ( udg_Cast_Loc )
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_FREEZELVL[(Player number of (Owner of (Picked unit)))] Greater than 0
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_FREEZELVL[(Player number of (Owner of (Picked unit)))] Equal to 5
- (Random integer number between 1 and 10) Less than or equal to 3
-
Then - Actions
- Set Cast_Loc = (Position of (Picked unit))
- Unit - Create 1 Dummy Cast for (Owner of (Picked unit)) at Cast_Loc facing Default building facing degrees
- Set Dummy_Unit = (Last created unit)
- Unit - Add a 3.00 second Generic expiration timer to Dummy_Unit
- Unit - Add Freeze Gun (Freeze) to Dummy_Unit
- Unit - Order Dummy_Unit to Human Mountain King - Storm Bolt Shot_Player
- Custom script: call RemoveLocation ( udg_Cast_Loc )
-
Else - Actions
- Set Cast_Loc = (Position of (Picked unit))
- Unit - Create 1 Dummy Cast for (Owner of (Picked unit)) at Cast_Loc facing Default building facing degrees
- Set Dummy_Unit = (Last created unit)
- Unit - Add a 3.00 second Generic expiration timer to Dummy_Unit
- Unit - Add Freeze Gun to Dummy_Unit
- Unit - Set level of Freeze Gun for Dummy_Unit to PLAYER_FREEZELVL[(Player number of (Owner of (Picked unit)))]
- Unit - Order Dummy_Unit to Human Sorceress - Slow Shot_Player
- Custom script: call RemoveLocation ( udg_Cast_Loc )
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Unit - Remove (Picked unit) from the game
- Set Shot_Travel_Range[(Player number of (Owner of (Picked unit)))] = 0.00
- Set Total_Shots = (Total_Shots - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Shot_Player has buff Evade ) Equal to True
-
Then - Actions
- Floating Text - Create floating text that reads Evade above Shot_Player with Z offset 0.00, using font size 12.00, color (100.00%, 100.00%, 100.00%), and 25.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
- Unit - Remove (Picked unit) from the game
- Set Shot_Travel_Range[(Player number of (Owner of (Picked unit)))] = 0.00
- Set Total_Shots = (Total_Shots - 1)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- PLAYER_RESISTSHOT[(Player number of (Owner of Shot_Player))] Greater than or equal to 3
-
Then - Actions
- Set PLAYER_RESISTSHOT[(Player number of (Owner of Shot_Player))] = 0
- Floating Text - Create floating text that reads Resist above Shot_Player with Z offset 0.00, using font size 12.00, color (100.00%, 100.00%, 100.00%), and 25.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
- Unit - Remove (Picked unit) from the game
- Set Shot_Travel_Range[(Player number of (Owner of (Picked unit)))] = 0.00
- Set Total_Shots = (Total_Shots - 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
In short the trigger is about firing skillshot missiles that cause damage and effects on hit. I thought that GUI was messed up about this, until I saw other GUI spells that are FAR FAR more complex than this that don't suffer from any lag. So its definitely me and the way I trigger.
Tested it for about 10-15 times with /fps command. It starts at 64.4 and it drops to 50.3 in about 2-3 minutes of firing the spell.
There are no units stacking up. I monitored the unit generation through in-game messages and its not that.
I'd REALLY love if anyone could point out what am I doing so wrong that this problem appears in two completely separate maps ( I didn't copy any triggers from either map, made both from scratch ) and the exactly same thing is happening.