HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Leak Problems.

04-17-2006, 03:47 AM#1
Exilus
Auparently a LOT of people lag in my map (Halo) are being very very slow(lagging). this result in having 6-7 players leaving in the first 5 mins. not fun...

i dont understand, i seem to have fixed ALL leaks...here are some examples of my triggers..



Sniper Riffle
Trigger:
Sniper Rifle Fire
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
((Owner of (Casting unit)) Current gold) Greater than or equal to 1
(Ability being cast) Equal to Ability - Sniper Rifle
Collapse Actions
Set TempPoint1 = (Position of (Casting unit))
Set TempPoint3 = (Target point of ability being cast)
Unit - Create 1 Trigger Caster for Neutral Passive at TempPoint1 facing Default building facing (270.0) degrees
Unit - Add Cooldown - Sniper Rifle to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Casting unit)
Player - Add -1 to (Owner of (Casting unit)) Current gold
Special Effect - Create a special effect attached to the weapon of (Casting unit) using war3mapImported\Konstrukt_SniperEffectAttachment.MDX
Special Effect - Destroy (Last created special effect)
Sound - Stop awp1 <gen> Immediately
Set TempGroup = (Units within 1500.00 of TempPoint1 matching (((Matching unit) is Mechanical) Equal to False))
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Advanced - Only for (Owner of (Picked unit)) play awp1 <gen>
Custom script: call DestroyGroup( udg_TempGroup )
Set TempPoint2 = (TempPoint1 offset by 25.00 towards (Angle from TempPoint1 to TempPoint3) degrees)
Unit - Create 1 Missile - Sniper Rifle for (Owner of (Casting unit)) at TempPoint2 facing (Angle from TempPoint2 to TempPoint3) degrees
Unit - Turn collision for (Last created unit) Off
Custom script: call RemoveLocation (udg_TempPoint1)
Custom script: call RemoveLocation (udg_TempPoint2)
Custom script: call RemoveLocation (udg_TempPoint3)
Trigger - Turn on Sniper Rifle Move <gen>

the trigger i think leak the most:
Trigger:
Sniper Rifle Move
Collapse Events
Time - Every 0.02 seconds of game time
Conditions
Collapse Actions
Set TempGroup = (Units of type Missile - Sniper Rifle)
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Set TempPoint1 = (Position of (Picked unit))
Set TempPoint2 = (TempPoint1 offset by 100.00 towards (Facing of (Picked unit)) degrees)
Unit - Move (Picked unit) instantly to TempPoint2
Set BulletOwner = (Owner of (Picked unit))
Set TempGroup2 = (Units within 55.00 of TempPoint2 matching ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) and (False Equal to False))))
Collapse Unit Group - Pick every unit in TempGroup2 and do (Actions)
Collapse Loop - Actions
Set TempPoint3 = (Position of (Picked unit))
Set TempGroup5 = (Units within 60.00 of TempPoint3 matching ((Unit-type of (Matching unit)) Equal to Missile - Sniper Rifle))
Unit - Cause (Random unit from TempGroup5) to damage (Picked unit), dealing 170.00 damage of attack type Spells and damage type Normal
Set HeadshotSniper = (Random integer number between 1 and 10)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
HeadshotSniper Greater than 7
Collapse Then - Actions
Unit - Cause (Random unit from TempGroup5) to damage (Picked unit), dealing 140.00 damage of attack type Spells and damage type Normal
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Unit-type of (Picked unit)) Equal to Spartan (Light Armor)
Collapse Then - Actions
Set TempPoint5 = (Position of (Picked unit))
Advanced - Show BOOM! HEADSHOT! (300!) with color (Critical Strike,Critical Strike,Critical Strike) at point ((X of TempPoint5),(Y of TempPoint5))
Custom script: call RemoveLocation (udg_TempPoint5)
Else - Actions
Collapse Else - Actions
Unit - Kill (Random unit from TempGroup5)
Trigger - Run Shield Get hit <gen> (checking conditions)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_TempPoint3)
Custom script: call DestroyGroup (udg_TempGroup5)
Custom script: call DestroyGroup (udg_TempGroup2)
Custom script: call RemoveLocation (udg_TempPoint1)
Custom script: call RemoveLocation (udg_TempPoint2)
Custom script: call DestroyGroup (udg_TempGroup)

Trigger:
Sniper Rifle Die
Collapse Events
Unit - A unit Dies
Collapse Conditions
(Unit-type of (Dying unit)) Equal to Missile - Sniper Rifle
Collapse Actions
Set TempGroup = (Units of type Missile - Sniper Rifle)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(TempGroup is empty) Equal to True
Collapse Then - Actions
Trigger - Turn off Sniper Rifle Move <gen>
Collapse Else - Actions
Do nothing
Custom script: call DestroyGroup( udg_TempGroup )
Unit - Remove (Dying unit) from the game


Trigger:
Sniper Rifle Reload
Collapse Events
Unit - A unit Begins channeling an ability
Collapse Conditions
(Ability being cast) Equal to Reload - Sniper Rifle
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Owner of (Triggering unit)) Current gold) Equal to 4
Collapse Then - Actions
Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) for 3.00 seconds the text: Your Sniper is alre...
Unit - Order (Triggering unit) to Stop
Skip remaining actions
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Charges remaining in (Item carried by (Triggering unit) of type Sniper ammos)) Greater than or equal to 1
Collapse Then - Actions
Wait 0.01 game-time seconds
Animation - Play (Casting unit)'s spell second animation
Wait 0.50 game-time seconds
Sound - Stop awp_clipout <gen> Immediately
Set TempPoint1 = (Position of (Casting unit))
Set TempGroup = (Units within 500.00 of TempPoint1 matching (((Matching unit) is Mechanical) Equal to False))
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Advanced - Only for (Owner of (Picked unit)) play awp_clipout <gen>
Custom script: call DestroyGroup( udg_TempGroup )
Custom script: call RemoveLocation( udg_TempPoint1 )
Wait 0.75 game-time seconds
Player - Set (Owner of (Casting unit)) Current gold to 0
Animation - Change (Casting unit)'s animation speed to 50.00% of its original speed
Animation - Play (Casting unit)'s spell second animation
Sound - Stop awp_clipin <gen> Immediately
Set TempPoint1 = (Position of (Casting unit))
Set TempGroup = (Units within 500.00 of TempPoint1 matching (((Matching unit) is Mechanical) Equal to False))
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Advanced - Only for (Owner of (Picked unit)) play awp_clipin <gen>
Custom script: call RemoveLocation( udg_TempPoint1 )
Custom script: call DestroyGroup( udg_TempGroup )
Wait 1.00 game-time seconds
Player - Set (Owner of (Casting unit)) Current gold to 4
Item - Set charges remaining in (Item carried by (Triggering unit) of type Sniper ammos) to ((Charges remaining in (Item carried by (Triggering unit) of type Sniper ammos)) - 1)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Charges remaining in (Item carried by (Triggering unit) of type Sniper ammos)) Equal to 0
Collapse Then - Actions
Item - Remove (Item carried by (Triggering unit) of type Sniper ammos)
Else - Actions
Wait 0.25 game-time seconds
Animation - Change (Casting unit)'s animation speed to 100.00% of its original speed
Animation - Play (Casting unit)'s spell second animation
Sound - Stop awp_deploy <gen> Immediately
Set TempPoint1 = (Position of (Casting unit))
Set TempGroup = (Units within 500.00 of TempPoint1 matching (((Matching unit) is Mechanical) Equal to False))
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Advanced - Only for (Owner of (Picked unit)) play awp_deploy <gen>
Custom script: call RemoveLocation( udg_TempPoint1 )
Custom script: call DestroyGroup( udg_TempGroup )
Wait 0.50 game-time seconds
Animation - Reset (Casting unit)'s animation
Collapse Else - Actions
Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) for 3.00 seconds the text: No ammos.
Unit - Order (Triggering unit) to Stop




I have 7 similar to this, all the weapons use nearly the same triggers.



"Shield Get Hit" Trigger, activated via Sniper Move trigger above

Trigger:
Shield Get hit
Events
Conditions
Collapse Actions
Set Shield[(Player number of (Owner of (Picked unit)))] = 8
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Unit-type of (Random unit from TempGroup5)) Equal to Missile - Flames
Collapse Then - Actions
Set Shield[(Player number of (Owner of (Picked unit)))] = 10
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Mana of (Picked unit)) Greater than 0.00
Collapse Then - Actions
Special Effect - Create a special effect attached to the origin of GUY[(Player number of (Owner of (Picked unit)))] using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Trigger - Turn on Shield regeneration <gen>

Shield Regeneration, activated in trigger above


Trigger:
Shield regeneration
Collapse Events
Time - Every 1.00 seconds of game time
Collapse Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
Shield[1] Less than or equal to 1
Shield[2] Less than or equal to 1
Shield[3] Less than or equal to 1
Shield[4] Less than or equal to 1
Shield[5] Less than or equal to 1
Shield[6] Less than or equal to 1
Shield[7] Less than or equal to 1
Shield[8] Less than or equal to 1
Shield[9] Less than or equal to 1
Shield[10] Less than or equal to 1
Shield[11] Less than or equal to 1
Shield[12] Less than or equal to 1
Collapse Actions
Set TempForce = (All players matching (((Matching player) slot status) Equal to Is playing))
Collapse Player Group - Pick every player in TempForce and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Shield[(Player number of (Picked player))] Equal to 1
(Mana of GUY[(Player number of (Picked player))]) Less than 100.00
Collapse Then - Actions
Unit - Set mana of GUY[(Player number of (Picked player))] to 100.00
Special Effect - Create a special effect attached to the origin of GUY[(Player number of (Picked player))] using Abilities\Spells\Human\Slow\SlowCaster.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Shield[12] Less than or equal to 0
Shield[11] Less than or equal to 0
Shield[10] Less than or equal to 0
Shield[9] Less than or equal to 0
Shield[8] Less than or equal to 0
Shield[7] Less than or equal to 0
Shield[6] Less than or equal to 0
Shield[5] Less than or equal to 0
Shield[4] Less than or equal to 0
Shield[3] Less than or equal to 0
Shield[2] Less than or equal to 0
Shield[1] Less than or equal to 0
Collapse Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Custom script: call DestroyForce (udg_TempForce)




Wep Respawns.

Trigger:
Weps And grenades
Collapse Events
Time - Every 60.00 seconds of game time
Conditions
Collapse Actions
Collapse Item - Pick every item in (Playable map area) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
(Item-type of (Picked item)) Equal to Needler ammos
(Item-type of (Picked item)) Equal to Pistol Ammos
(Item-type of (Picked item)) Equal to Assault Riffle Ammos
(Item-type of (Picked item)) Equal to Shotgun Ammos
(Item-type of (Picked item)) Equal to Rockets
(Item-type of (Picked item)) Equal to Flamethrower Ammos
(Item-type of (Picked item)) Equal to Sniper ammos
(Item-type of (Picked item)) Equal to Rocket Launcher
(Item-type of (Picked item)) Equal to Flamethrower
(Item-type of (Picked item)) Equal to Needler
(Item-type of (Picked item)) Equal to Pistol
(Item-type of (Picked item)) Equal to Plasma Pistol
(Item-type of (Picked item)) Equal to Assault Riffle
(Item-type of (Picked item)) Equal to Fuel Rod gun
(Item-type of (Picked item)) Equal to Shotgun
(Item-type of (Picked item)) Equal to Sniper
(Item-type of (Picked item)) Equal to Grenade
Collapse Then - Actions
Item - Remove (Picked item)
Else - Actions
Set WepPoint[1] = (Center of Grenade 1 <gen>)
Set WepPoint[2] = (Center of Grenade 2 <gen>)
Set WepPoint[3] = (Center of Grenade 3 <gen>)
Set WepPoint[4] = (Center of Grenade 4 <gen>)
Set WepPoint[5] = (Center of Grenade 5 <gen>)
Set WepPoint[6] = (Center of Grenade 6 <gen>)
Set WepPoint[7] = (Center of Grenade 7 <gen>)
Set WepPoint[8] = (Center of Grenade 8 <gen>)
Set WepPoint[9] = (Center of Riffle 1 <gen>)
Set WepPoint[10] = (Center of Riffle 2 <gen>)
Set WepPoint[11] = (Center of Riffle 3 <gen>)
Set WepPoint[12] = (Center of Riffle 4 <gen>)
Set WepPoint[13] = (Center of Needler 2 <gen>)
Set WepPoint[14] = (Center of Needler 4 <gen>)
Set WepPoint[15] = (Center of Shotgun 1 <gen>)
Set WepPoint[16] = (Center of Shotgun 2 <gen>)
Set WepPoint[17] = (Center of Shotgun 3 <gen>)
Set WepPoint[18] = (Center of Shotgun 4 <gen>)
Set WepPoint[21] = (Center of Rocket <gen>)
Set WepPoint[22] = (Center of Rodgun <gen>)
Set WepPoint[23] = (Center of Pistol 1 <gen>)
Set WepPoint[24] = (Center of Pistol 2 <gen>)
Set WepPoint[25] = (Center of Flame 1 <gen>)
Set WepPoint[26] = (Center of Flame 2 <gen>)
Item - Create Grenade at WepPoint[1]
Item - Create Grenade at WepPoint[2]
Item - Create Grenade at WepPoint[3]
Item - Create Grenade at WepPoint[4]
Item - Create Grenade at WepPoint[5]
Item - Create Grenade at WepPoint[6]
Item - Create Grenade at WepPoint[7]
Item - Create Grenade at WepPoint[8]
Item - Create Assault Riffle at WepPoint[9]
Item - Create Assault Riffle at WepPoint[10]
Item - Create Assault Riffle at WepPoint[11]
Item - Create Assault Riffle at WepPoint[12]
Item - Create Assault Riffle Ammos at WepPoint[9]
Item - Create Assault Riffle Ammos at WepPoint[10]
Item - Create Assault Riffle Ammos at WepPoint[11]
Item - Create Assault Riffle Ammos at WepPoint[12]
Item - Create Needler at WepPoint[13]
Item - Create Needler at WepPoint[14]
Item - Create Needler ammos at WepPoint[13]
Item - Create Needler ammos at WepPoint[14]
Item - Create Shotgun at WepPoint[15]
Item - Create Shotgun at WepPoint[16]
Item - Create Shotgun at WepPoint[17]
Item - Create Shotgun at WepPoint[18]
Item - Create Shotgun Ammos at WepPoint[15]
Item - Create Shotgun Ammos at WepPoint[16]
Item - Create Shotgun Ammos at WepPoint[17]
Item - Create Shotgun Ammos at WepPoint[18]
Item - Create Rocket Launcher at WepPoint[21]
Item - Create Rockets at WepPoint[21]
Item - Create Fuel Rod gun at WepPoint[22]
Item - Create Pistol at WepPoint[23]
Item - Create Pistol at WepPoint[24]
Item - Create Pistol Ammos at WepPoint[23]
Item - Create Pistol Ammos at WepPoint[24]
Item - Create Flamethrower at WepPoint[25]
Item - Create Flamethrower at WepPoint[26]
Item - Create Flamethrower Ammos at WepPoint[25]
Item - Create Flamethrower Ammos at WepPoint[26]
Custom script: call RemoveLocation (udg_WepPoint[1])
Custom script: call RemoveLocation (udg_WepPoint[2])
Custom script: call RemoveLocation (udg_WepPoint[3])
Custom script: call RemoveLocation (udg_WepPoint[4])
Custom script: call RemoveLocation (udg_WepPoint[5])
Custom script: call RemoveLocation (udg_WepPoint[6])
Custom script: call RemoveLocation (udg_WepPoint[7])
Custom script: call RemoveLocation (udg_WepPoint[8])
Custom script: call RemoveLocation (udg_WepPoint[9])
Custom script: call RemoveLocation (udg_WepPoint[10])
Custom script: call RemoveLocation (udg_WepPoint[11])
Custom script: call RemoveLocation (udg_WepPoint[12])
Custom script: call RemoveLocation (udg_WepPoint[13])
Custom script: call RemoveLocation (udg_WepPoint[14])
Custom script: call RemoveLocation (udg_WepPoint[15])
Custom script: call RemoveLocation (udg_WepPoint[16])
Custom script: call RemoveLocation (udg_WepPoint[17])
Custom script: call RemoveLocation (udg_WepPoint[18])
Custom script: call RemoveLocation (udg_WepPoint[21])
Custom script: call RemoveLocation (udg_WepPoint[22])
Custom script: call RemoveLocation (udg_WepPoint[23])
Custom script: call RemoveLocation (udg_WepPoint[24])
Custom script: call RemoveLocation (udg_WepPoint[25])
Custom script: call RemoveLocation (udg_WepPoint[26])


Spartan Death and Respawn

Trigger:
Spartan Die 1
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Dying unit) is Mechanical) Equal to False
(Owner of (Dying unit)) Not equal to Neutral Passive
((Owner of (Dying unit)) is in (All allies of Player 1 (Red))) Equal to True
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True
Collapse Then - Actions
Game - Display to (All players) for 3.00 seconds the text: ((Name of (Owner of (Killing unit))) + ( has killed + (Name of (Owner of (Dying unit)))))
Set Deaths[(Player number of (Owner of (Dying unit)))] = (Deaths[(Player number of (Owner of (Dying unit)))] + 1)
Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
Set AAAAKillingSpree[(Player number of (Owner of (Dying unit)))] = 0
Multiboard - Set the text for (Last created multiboard) item in column 3, row ((Player number of (Owner of (Killing unit))) + 1) to (|c000000FF + ((String(Kills[(Player number of (Owner of (Killing unit)))])) + |r))
Multiboard - Set the text for (Last created multiboard) item in column 4, row ((Player number of (Owner of (Dying unit))) + 1) to (|cffFF0000 + ((String(Deaths[(Player number of (Owner of (Dying unit)))])) + |r))
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Killing unit) belongs to an ally of (Owner of (Dying unit))) Equal to True
(Owner of (Killing unit)) Not equal to (Owner of (Dying unit))
Collapse Then - Actions
Set Deaths[(Player number of (Owner of (Dying unit)))] = (Deaths[(Player number of (Owner of (Dying unit)))] + 1)
Set AAAAKillingSpree[(Player number of (Owner of (Dying unit)))] = 0
Multiboard - Set the text for (Last created multiboard) item in column 4, row ((Player number of (Owner of (Dying unit))) + 1) to (|cffFF0000 + ((String(Deaths[(Player number of (Owner of (Dying unit)))])) + |r))
Game - Display to (All players) the text: (|Cffff0000 + ((Name of (Owner of (Killing unit))) + ( betrayed + (Name of (Owner of (Dying unit))))))
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Killing unit)) Equal to (Owner of (Dying unit))
Collapse Then - Actions
Set Deaths[(Player number of (Owner of (Dying unit)))] = (Deaths[(Player number of (Owner of (Dying unit)))] + 1)
Set AAAAKillingSpree[(Player number of (Owner of (Dying unit)))] = 0
Multiboard - Set the text for (Last created multiboard) item in column 4, row ((Player number of (Owner of (Dying unit))) + 1) to (|cffFF0000 + ((String(Deaths[(Player number of (Owner of (Dying unit)))])) + |r))
Game - Display to (All players) the text: (|Cffff0000 + ((Name of (Owner of (Dying unit))) + has commited suicide))
Else - Actions
Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) for 1.00 seconds the text: Respawn in............
Wait 1.00 seconds
Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) for 1.00 seconds the text: Respawn in............
Wait 1.00 seconds
Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) for 1.00 seconds the text: Respawn in............
Wait 1.00 seconds
Player - Set (Owner of (Triggering unit)) Current lumber to 2
Set TempPoint1 = (Random point in RedBase <gen>)
Set TempPoint2 = (Center of BlueBase <gen>)
Unit - Create 1 Spartan (Light Armor) for (Owner of (Triggering unit)) at TempPoint1 facing TempPoint2
Unit - Add Invulnerability to (Last created unit)
Set GUY[(Player number of (Owner of (Last created unit)))] = (Last created unit)
Hero - Create Plasma Pistol and give it to (Last created unit)
Hero - Order (Last created unit) to use (Last created item)
Set AAPlasmaArrayGold[(Player number of (Owner of (Triggering unit)))] = 100
Set AARodGunArray[(Player number of (Owner of (Triggering unit)))] = 80
Set AAShotgunArrayGold[(Player number of (Owner of (Triggering unit)))] = 12
Set AASniperArrayGold[(Player number of (Owner of (Triggering unit)))] = 4
Set AARocketArrayGold[(Player number of (Owner of (Triggering unit)))] = 2
Set AARiffleArrayGold[(Player number of (Owner of (Triggering unit)))] = 60
Set AAFlameArrayGold[(Player number of (Owner of (Triggering unit)))] = 60
Set AANeedlerArrayGold[(Player number of (Owner of (Triggering unit)))] = 20
Set AAPistolArrayGold[(Player number of (Owner of (Triggering unit)))] = 12
Set TempPoint3 = (Position of (Last created unit))
Camera - Pan camera for (Owner of (Triggering unit)) to TempPoint3 over 0.00 seconds
Selection - Select (Last created unit) for (Owner of (Dying unit))
Unit - Remove (Dying unit) from the game
Custom script: call RemoveLocation (udg_TempPoint1)
Custom script: call RemoveLocation (udg_TempPoint2)
Custom script: call RemoveLocation (udg_TempPoint3)





Weapon changes (only listen changes for Assault riffle. its all the same thing, for different weps, anyway.)

Trigger:
Add assault riffle
Collapse Events
Unit - A unit Uses an item
Collapse Conditions
(Item-type of (Item being manipulated)) Equal to Assault Riffle
Collapse Actions
Hero - Give (Item being manipulated) to Inventory[(Player number of (Owner of (Triggering unit)))]
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
((Triggering unit) has Blue Flag 0326 <gen>) Equal to True
((Triggering unit) has Red Flag 0327 <gen>) Equal to True
Collapse Then - Actions
Hero - Drop Blue Flag 0326 <gen> from (Triggering unit)
Hero - Drop Red Flag 0327 <gen> from (Triggering unit)
Else - Actions
Wait 0.20 seconds
Unit - Add Ability - Sub Machine Gun to (Triggering unit)
Unit - Add Weapon - Sub Machine Gun to (Triggering unit)
Unit - Add Reload - Sub Machine Gun to (Triggering unit)
Player - Set (Owner of (Triggering unit)) Current gold to AARiffleArrayGold[(Player number of (Owner of (Triggering unit)))]


Trigger:
Remove assault riffle
Collapse Events
Unit - A unit Uses an item
Collapse Conditions
(Item-type of (Item being manipulated)) Not equal to Assault Riffle
Collapse Or - Any (Conditions) are true
Collapse Conditions
(Item-type of (Item carried by Inventory[(Player number of (Owner of (Triggering unit)))] in slot 1)) Equal to Assault Riffle
(Item-type of (Item carried by Inventory[(Player number of (Owner of (Triggering unit)))] in slot 2)) Equal to Assault Riffle
Collapse Actions
Set AARiffleArrayGold[(Player number of (Owner of (Triggering unit)))] = ((Owner of (Triggering unit)) Current gold)
Wait 0.01 seconds
Player - Set (Owner of (Triggering unit)) Current gold to 0
Unit - Remove Ability - Sub Machine Gun from (Triggering unit)
Unit - Remove Weapon - Sub Machine Gun from (Triggering unit)
Unit - Remove Reload - Sub Machine Gun from (Triggering unit)
Wait 0.10 seconds
Hero - Give (Item carried by Inventory[(Player number of (Owner of (Triggering unit)))] of type Assault Riffle) to (Triggering unit)







Could any pro map maker tell me what's leaking? i'd be glad...its just very frustrating to have a map and not being able to play it because people with weak comps are lagging....
04-17-2006, 07:10 AM#2
vile
A permanent timer of .02 seconds all game long doesnt look very friendly to me.
04-17-2006, 07:39 AM#3
Vuen
Lol... In Sniper Rifle Move:

Trigger:
Set TempGroup2 = (Units within 55.00 of TempPoint2 matching ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) and (False Equal to False))))
Set TempGroup2 = (Units within 55.00 of TempPoint2 matching ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) and (False Equal to False))))

Same line twice. You're leaking 50 unit groups per second.


Leak checker shows your "BOOM HEADSHOT" messages leak 4 locations. Strangely it didn't pick up the group leak above.
04-17-2006, 08:51 AM#4
mmx2000
Quote:
Originally Posted by Vuen
Leak checker
Sorry to jump off-topic: Can I get a link to that? >.>
Can't find it atm.
04-17-2006, 09:02 AM#5
Vuen
http://www.wc3sear.ch/index.php?p=Tools&ID=114
04-17-2006, 09:37 AM#6
blu_da_noob
The place where you use Advanced - Show ..... (boom headshot trigger) is leaking two locations. Also, all your group loops where you use a (Mathcing Unit) is (something here) are leaking a filter (or I think it's a condition for BJ's). And that is happening a lot.
04-17-2006, 03:08 PM#7
Exilus
Quote:
Originally Posted by vile
A permanent timer of .02 seconds all game long doesnt look very friendly to me.


i dont know if you noticed, but this trigger is ONLY turned on when someone fire, and instantly turned off when the last ammo of type "sniper" dies.
04-17-2006, 03:11 PM#8
Exilus
Quote:
Originally Posted by blu_da_noob
Also, all your group loops where you use a (Matching Unit) is (something here) are leaking a filter (or I think it's a condition for BJ's). And that is happening a lot.


Leaking a filter??? what do you mean?
04-17-2006, 03:15 PM#9
Exilus
Quote:
Originally Posted by Vuen
Lol... In Sniper Rifle Move:

Trigger:
Set TempGroup2 = (Units within 55.00 of TempPoint2 matching ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) and (False Equal to False))))
Set TempGroup2 = (Units within 55.00 of TempPoint2 matching ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) and (False Equal to False))))

Same line twice. You're leaking 50 unit groups per second.


Leak checker shows your "BOOM HEADSHOT" messages leak 4 locations. Strangely it didn't pick up the group leak above.




thanks!!! Not 50 points a second..50 points second X Different number of weapons being fired.... so 0-350 points/second...ouch.
04-17-2006, 04:36 PM#10
blu_da_noob
Quote:
Originally Posted by Exilus
Leaking a filter??? what do you mean?

Whenever you use a BJ Group Loop with a matching function, a new condition is created to check your units against. I don't think there is a way to clean these up and still use GUI.
04-17-2006, 04:58 PM#11
Captain Griffen
Really? In that case, couldn't you use if/then/elses to select the units from the unit group?
04-17-2006, 10:53 PM#12
Exilus
Anything else? people are still lagging >.<
04-18-2006, 06:21 AM#13
Anitarf
Well, the whole projectile-moving triggers can't really be done that efficiently in GUI. You say you aren't moving more than 7 projectiles at a time, but anyway. If the map has too many triggers running, it will lag even if those triggers do not leak.
04-18-2006, 07:13 AM#14
illlusion
I totally agree with Anitarf.
Even if very heavily leak may not lead to such bad lag in just FIVE minutes.
It just may be that your GUI make too much burden to the poor CPU...
04-18-2006, 12:22 PM#15
Blade.dk
Last time I checked, the pick every unit in <something> functions in the GUI destroyed the boolexpr filter automatically, so that should not really be a problem.