• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Leaks-custom script syntax

Status
Not open for further replies.
Level 4
Joined
Dec 3, 2012
Messages
51
Hey,

Sorry for such a basic question, but does the syntax for custom scripts to remove groups and points matter? For instance, I have seen:

Custom script: call RemoveLocation(udg_Point)
Custom script: call RemoveLocation( udg_Point )
Custom script: call RemoveLocation (udg_Point)


I currently have perhaps 15 triggers that use the last syntax for a unit spawn trigger every 65 secs. I am experiencing alot of lag, and am wondering if it is because I am not properly removing leaks or if my old machine just cant handle that many units (which to be honest really isnt that much, using melee food cap, about 400 worth of units at any given time).

Any help would be great, thanks.

An example of my unit spawn trigger:

  • Ancient Spawn lvl1
    • Events
      • Time - Every 65.00 seconds of game time
    • Conditions
      • (Player 5 (Yellow) Food used) Less than or equal to 300
    • Actions
      • Set Point2 = (Center of Ancient Spawn Zone <gen>)
      • If ((Ancient of Wind 0064 <gen> is alive) Equal to True) then do (Unit - Create 1 Druid of the Talon (Night Elf Form) for Player 5 (Yellow) at Point2 facing 90.00 degrees) else do (Do nothing)
      • If ((Ancient of Lore 0063 <gen> is alive) Equal to True) then do (Unit - Create 3 Dryad for Player 5 (Yellow) at Point2 facing 90.00 degrees) else do (Do nothing)
      • Custom script: call RemoveLocation (udg_Point2)
 
Level 4
Joined
Dec 3, 2012
Messages
51
Thanks. I had another question: Why does this trigger only add gold once?

  • gold
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Set PlayerGroup = (All players)
      • Player Group - Pick every player in PlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Add 1000 to (Picked player) Current gold
      • Custom script: call DestroyForce (udg_PlayerGroup)

This trigger works, but i believe it leaks:

  • gold2
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Add 1000 to (Picked player) Current gold
 
Level 4
Joined
Dec 3, 2012
Messages
51
Will that leak? Most of the tutorials say to use Custom script: call DestroyForce( udg_TempForce ). When I dont have the custom script it works, so you may be right. Since it is periodic, i want to make sure it does not leak
 
Status
Not open for further replies.
Top