![]() ![]() This introduces a new leak, the special effect leak, and has one we just went over, the point leak. Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl Unit - Create 1 Footman for Player 1 (Red) at Temp_Point facing Default building facing degreesĬustom script: call RemoveLocation (udg_Temp_Point)īy setting our position that we want the unit to be created at, creating it at the variable, then removing it, we remove all leaks. Set Temp_Point = (Center of (Playable map area)) This is not a major leak, but depending on the amount of units created, and how often, it can add up. ![]() Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees Remember that when referencing a variable in JASS, you most use underlines for spaces and put ‘udg’ before the Variable name. We first set our unit group to a unit group variable, pick all the units in this variable, do our actions, and then destroy the unit group variable, using a Custom Script. Unit Group - Pick every unit in Temp_Group and do (Actions)Ĭustom script: call DestroyGroup (udg_Temp_Group) Set Temp_Group = (Units in (Playable map area)) Now this will leak memory for every unit picked, which, depending on how many times this is ran, can add up heavily. Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions) Now I will show you examples of each of the most common, with memory leaks, and then after cleaning them up: (There may be more which I have forgotten, but these are the ones that need to be dealt with the most, since they are most commonly used.) Now many different things can cause memory leaks, these include: This is what we will be using to clean up most of our memory leaks, since Blizzard put in the ability to remove these leaks, but neglected to add them to basic GUI. However, the actual language of these is that of JASS, which can give you almost free reign over every aspect of the game.Ĭustom Script: this is an action in the World Editor Trigger Editor which allows you to type one line of JASS script as opposed to using a template GUI script. Most people make triggers in GUI format, the premade template triggers that are in the World Editor. Jass: the scripting language used for scripting Maps and AI files in Blizzard Entertainment's Warcraft III game. Now granted these are cleaned at the end of the game, but if enough pile up during play without being removed, it can cause serious lag to the players, ranging from a little here and there, to complete un-playability, neither of which is wanted. Memory Leak: the leakage of handle objects, or in other words, basically whenever you create something or reference something, other than integers the game loses it’s location, thus causing a leaked piece of memory. Let me start by introducing everyone to the not so common terms I will be using: This also should provide us with a quick answer to all those posts about this, so we can just send people in the direction of this thread, and tell them to read. ![]() This tutorial is to provide knowledge of the basic memory leaks and ways to clean them up using custom scripts, for those of us who are not yet intone enough with JASS to make all our triggers using such. I have seen this going around a lot lately, people asking for help with memory leaks and custom scripts. ~~ emjlr3's Memory Leak / Custom Script Guide ~~ Triggers - Memory Leaks and Custom Scripts
0 Comments
Leave a Reply. |