• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Is this leakless?

Status
Not open for further replies.
Level 8
Joined
Jun 25, 2007
Messages
165
This script are correct for leak or not (im not very good with custom scripts)
  • Computer
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
      • (Player 1 (Red) controller) Equal to Computer
    • Actions
      • Set StartLoc[1] = (Player 1 (Red) start location)
      • Melee Game - Create (Race of Player 1 (Red)) starting units for Player 1 (Red) at StartLoc[1] (Include Heroes)
      • Custom script: call RemoveLocation( udg_StartLoc[1] )
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
Player Group
Note: (All Players) does not leak, and destroying it can result in problems
Player Groups leak also, but those are really rare. The fix:
  • Player Group
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Some Spell
    • Actions
      • Set PlayerGroup = (All enemies of Player 1 (Red))
      • Player Group - Pick every player in PlayerGroup and do (Do nothing)
      • Custom script: call DestroyForce(udg_PlayerGroup)
Source: http://www.hiveworkshop.com/forums/showthread.php?t=35124&highlight=what+are+leaks
 
Status
Not open for further replies.
Top