- Joined
- Mar 21, 2008
- Messages
- 367
so I have at least 7+ periodic triggers that run every 0.01 seconds
and I'm convinced they are all leakless - they're also turned off when not in use, etc; there are also some that are constantly on, however
^ pic is wc3's memory usage after 20-30 or so minutes of playing, lol. at this point it just crashes and gives me the error
and normally its at like 130000K at the start
the weird thing is that nobody in-game was having any major fps issues (at least, I don't think so). personally, my fps stayed at a constant 60, and my friend said his only dropped by 10
so my question is: wat do?
also some sample triggers below
-
movecheck loop
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in main_uGrp and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (String((Current order of (Picked unit)))) Not equal to move
- (String((Current order of (Picked unit)))) Not equal to smart
-
Then - Actions
- Set main_bMoving[(Player number of (Owner of (Picked unit)))] = False
-
Else - Actions
- Set main_bMoving[(Player number of (Owner of (Picked unit)))] = True
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in main_uGrp) Equal to (Number of players in (All players matching (main_bMoving[(Player number of (Matching player))] Equal to False)))
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in main_uGrp and do (Actions)
-
Events
-
cam loop
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in cam_plGrp and do (Actions)
-
Loop - Actions
- Animation - Change main_Unit[(Player number of (Picked player))]'s vertex coloring to (100.00%, 100.00%, 100.00%) with main_StatCloakLvl[(Player number of (Picked player))]% transparency
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- cam_Fixed[(Player number of (Picked player))] Equal to True
-
Then - Actions
- Camera - Apply cam_camObject[(Player number of (Picked player))] for (Picked player) over 0.30 seconds
-
Else - Actions
- Set cam_Loc[0] = (Position of cam_Unit[(Player number of (Picked player))])
- Set cam_Loc[1] = (cam_Loc[0] offset by cam_Offset[(Player number of (Owner of cam_Unit[(Player number of (Picked player))]))] towards cam_OffsetAngle[(Player number of (Owner of cam_Unit[(Player number of (Picked player))]))] degrees)
- Custom script: set udg_temp_Real[100] = GetLocationZ(udg_cam_Loc[1])
- Camera - Pan camera for (Picked player) to cam_Loc[1] over 0.10 seconds
- Camera - Set (Picked player)'s camera Angle of attack to cam_AoA[(Player number of (Owner of cam_Unit[(Player number of (Picked player))]))] over 0.10 seconds
- Camera - Set (Picked player)'s camera Height Offset to (cam_Height[(Player number of (Owner of cam_Unit[(Player number of (Picked player))]))] + temp_Real[100]) over 0.10 seconds
- Camera - Set (Picked player)'s camera Rotation to cam_Rotation[(Player number of (Owner of cam_Unit[(Player number of (Picked player))]))] over 0.10 seconds
- Camera - Set (Picked player)'s camera Distance to target to cam_Dist[(Player number of (Owner of cam_Unit[(Player number of (Picked player))]))] over 0.10 seconds
- Camera - Set (Picked player)'s camera Far Z to cam_FarZ[(Player number of (Owner of cam_Unit[(Player number of (Picked player))]))] over 0.00 seconds
- Custom script: call RemoveLocation(udg_cam_Loc[0])
- Custom script: call RemoveLocation(udg_cam_Loc[1])
-
If - Conditions
-
Loop - Actions
-
Player Group - Pick every player in cam_plGrp and do (Actions)
-
Events
-
hud loop
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in main_uGrp and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is alive) Equal to True
- ((Picked unit) is hidden) Equal to False
-
Then - Actions
- Set hud_Loc[0] = (Position of (Picked unit))
- Floating Text - Change the position of (Load 0 of (Key (Picked unit)) in text_TableIf the label is not found, this function returns NULL.) to hud_Loc[0] with Z offset 0.00
- Floating Text - Hide (Load 0 of (Key (Picked unit)) in text_TableIf the label is not found, this function returns NULL.) for (All players)
- Floating Text - Show (Load 0 of (Key (Picked unit)) in text_TableIf the label is not found, this function returns NULL.) for (All allies of (Owner of (Picked unit)))
- Floating Text - Change the position of (Load 1 of (Key (Picked unit)) in text_TableIf the label is not found, this function returns NULL.) to hud_Loc[0] with Z offset 40.00
- Floating Text - Hide (Load 1 of (Key (Picked unit)) in text_TableIf the label is not found, this function returns NULL.) for (All players)
- Floating Text - Show (Load 1 of (Key (Picked unit)) in text_TableIf the label is not found, this function returns NULL.) for (All allies of (Owner of (Picked unit)))
- Custom script: call RemoveLocation(udg_hud_Loc[0])
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in (Units in (Playable map area) matching ((((Matching unit) is in main_uGrp) Equal to True) and (((Matching unit) is alive) Equal to True)))) Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in main_uGrp and do (Actions)
-
Events
-
projectile loop
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in prj_uGrp and do (Actions)
-
Loop - Actions
- Set prj_Unit = (Picked unit)
- Set prj_Angle = (Load 0 of (Key (Picked unit)) from prj_Table)
- Set prj_CollisionRadius = (Load 1 of (Key (Picked unit)) from prj_Table)
- Set prj_Damage = (Load 2 of (Key (Picked unit)) from prj_Table)
- Set prj_Speed = (Load 3 of (Key (Picked unit)) from prj_Table)
- Set prj_SpeedRate = (Load 4 of (Key (Picked unit)) from prj_Table)
- Set prj_Duration = (Load 5 of (Key (Picked unit)) from prj_Table)
- Set prj_bCritFromBehind = (Load 6 of (Key (Picked unit)) from prj_Table)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- prj_Duration Greater than 0.00
-
Then - Actions
- Set prj_Speed = (prj_Speed + prj_SpeedRate)
- Set prj_Duration = (prj_Duration - 0.01)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is dead) Equal to True
-
Then - Actions
- Set prj_Duration = 0.00
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- prj_Speed Less than or equal to 0.00
-
Then - Actions
- Set prj_Duration = 0.00
- Else - Actions
-
If - Conditions
- Set prj_Loc[0] = (Position of (Picked unit))
- Set prj_Loc[1] = (prj_Loc[0] offset by prj_Speed towards prj_Angle degrees)
-
Destructible - Pick every destructible within prj_CollisionRadius of prj_Loc[1] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Destructible-type of (Picked destructible)) Equal to Wall
- (Destructible-type of (Picked destructible)) Equal to Pathing Blocker (Ground)
- (Destructible-type of (Picked destructible)) Equal to Pathing Blocker (Ground) (Large)
- (Destructible-type of (Picked destructible)) Equal to Tree
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set prj_Duration = 0.00
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Terrain pathing at prj_Loc[1] of type Walkability is off) Equal to False
-
Then - Actions
- Custom script: call SetUnitX(GetEnumUnit(), GetLocationX(udg_prj_Loc[1]))
- Custom script: call SetUnitY(GetEnumUnit(), GetLocationY(udg_prj_Loc[1]))
-
Else - Actions
- Set prj_Duration = 0.00
-
If - Conditions
- Set temp_uGrp[0] = (Units within prj_CollisionRadius of prj_Loc[1])
-
Unit Group - Pick every unit in temp_uGrp[0] and do (Actions)
-
Loop - Actions
- Set prj_Loc[2] = (Position of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is alive) Equal to True
- ((Picked unit) belongs to an enemy of (Owner of prj_Unit)) Equal to True
- (Level of Invulnerable (Neutral) for (Picked unit)) Equal to 0
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Status: Revealed for (Picked unit)) Equal to 1
- (Unit-type of prj_Unit) Equal to Flare Gun: Flare
-
Then - Actions
- Set prj_Damage = 5000.00
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- prj_bCritFromBehind Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Abs(((Abs(((Angle from prj_Loc[2] to prj_Loc[0]) mod 360.00))) - (Abs(((Facing of (Picked unit)) mod 360.00)))))) Greater than or equal to 90.00
- (Abs(((Abs(((Angle from prj_Loc[2] to prj_Loc[0]) mod 360.00))) - (Abs(((Facing of (Picked unit)) mod 360.00)))))) Less than or equal to 270.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Attachment: Flint Gun for main_Unit[(Player number of (Owner of prj_Unit))]) Equal to 1
-
Then - Actions
- Set prj_Damage = 900.00
- Else - Actions
-
If - Conditions
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\VengeanceMissile\VengeanceMissile.mdl
- Special Effect - Destroy (Last created special effect)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Unit - Cause prj_Unit to damage (Picked unit), dealing prj_Damage damage of attack type Normal and damage type Normal
- Set prj_Duration = 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Custom script: call UnitSound(GetEnumUnit(),"Sound\\Units\\Combat\\WoodLightBashFlesh3.wav",125,4500)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_prj_Loc[2])
-
Loop - Actions
- Custom script: call DestroyGroup(udg_temp_uGrp[0])
- Custom script: call RemoveLocation(udg_prj_Loc[0])
- Custom script: call RemoveLocation(udg_prj_Loc[1])
- Custom script: set udg_prj_Unit = null
-
Else - Actions
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in prj_Table
- Unit - Kill (Picked unit)
- Unit - Remove (Picked unit) from the game
- Unit Group - Remove (Picked unit) from prj_uGrp
-
If - Conditions
- Hashtable - Save prj_Angle as 0 of (Key (Picked unit)) in prj_Table
- Hashtable - Save prj_CollisionRadius as 1 of (Key (Picked unit)) in prj_Table
- Hashtable - Save prj_Damage as 2 of (Key (Picked unit)) in prj_Table
- Hashtable - Save prj_Speed as 3 of (Key (Picked unit)) in prj_Table
- Hashtable - Save prj_SpeedRate as 4 of (Key (Picked unit)) in prj_Table
- Hashtable - Save prj_Duration as 5 of (Key (Picked unit)) in prj_Table
- Hashtable - Save prj_bCritFromBehind as 6 of (Key (Picked unit)) in prj_Table
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in prj_uGrp) Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in prj_uGrp and do (Actions)
-
Events