• 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.

Problem with leaks...again!

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hi! I just understand what are leaks and how to destroy them, but i am still not sure if i am right, so i wanna ask you the following : if i have variable named tempPoint with variable type : Point and 0 array, if i have
  • Set tempPoint = (Center of SpawnArea <gen>)
then will this :
  • Unit - Create 1 Zergling for Player 12 (Brown) at (Center of SpawnArea <gen>) facing 90.00 degrees
be the same as this :
  • Unit - Create 1 Zergling for Player 12 (Brown) at tempPoint facing 90.00 degrees
... and i want to ask you other thing - in this trigger will the leak be destroyed?
  • Level 40
    • Events
      • Player - Player 1 (Red) types a chat message containing -go40 as An exact match
      • Player - Player 2 (Blue) types a chat message containing -go40 as An exact match
      • Player - Player 3 (Teal) types a chat message containing -go40 as An exact match
    • Conditions
    • Actions
      • Custom script: call RemoveLocation( udg_tempPoint )
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Repair Equal to 39
        • Then - Actions
          • Set Repair = (Repair + 1)
          • Game - Display to (All players) the text: Current creep level...
          • Unit - Create 1 Red Drake for Player 12 (Brown) at (Center of SpawnArea <gen>) facing 90.00 degrees
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Game - Display to (All players) the text: You are not that level!
Thank you for posting and helping me!!! +rep for help!
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Hi! I just understand what are leaks and how to destroy them, but i am still not sure if i am right, so i wanna ask you the following : if i have variable named tempPoint with variable type : Point and 0 array, if i have
  • Set tempPoint = (Center of SpawnArea <gen>)
then will this :
  • Unit - Create 1 Zergling for Player 12 (Brown) at (Center of SpawnArea <gen>) facing 90.00 degrees
be the same as this :
  • Unit - Create 1 Zergling for Player 12 (Brown) at tempPoint facing 90.00 degrees

Use the variable to spawn the unit.

  • Level 40
    • Events
      • Player - Player 1 (Red) types a chat message containing -go40 as An exact match
      • Player - Player 2 (Blue) types a chat message containing -go40 as An exact match
      • Player - Player 3 (Teal) types a chat message containing -go40 as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Repair Equal to 39
        • Then - Actions
          • Set Repair = (Repair + 1)
          • Game - Display to (All players) the text: Current creep level...
          • Set tempPoint = Center of SpawnArea <gen>
          • Unit - Create 1 Red Drake for Player 12 (Brown) at tempPoint facing 90.00 degrees
          • Trigger - Turn off (This trigger)
          • Custom script: call RemoveLocation( udg_tempPoint )
        • Else - Actions
          • Game - Display to (All players) the text: You are not that level!
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You can do this at map initialization
  • Set tempPoint = (Center of SpawnArea <gen>)
And then use it as many times you like:
  • Unit - Create 1 Zergling for Player 12 (Brown) at tempPoint facing 90.00 degrees
  • Unit - Create 1 Hydralisk for Player 12 (Brown) at tempPoint facing 90.00 degrees
  • Unit - Create 1 Ultralisk for Player 12 (Brown) at tempPoint facing 90.00 degrees
You don't have to remove the location if you're going to use it again. Just don't set any other point to tempPoint so you don't overwrite it.
 
Status
Not open for further replies.
Top