• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Resident Evil: Detoxification

Status
Not open for further replies.
Level 6
Joined
May 14, 2009
Messages
129
This one of my most complex maps but the administrators told me that there are map leaks in my map. For those who will test this map, pls. tell me where the map leaks happen and how can I find and fix map leaks.
 
Last edited:
Level 11
Joined
Jun 21, 2007
Messages
505
Alright, for example in trigger "move" there's a leak, when you order a unit to move to a center of a region.

(Center of a Region) is a function which points to the location in the center of the region. It creates a variable which is not used later. The right way to do that is this: (temp_point variable is a variable of type Location/Point
  • Events
  • Conditions
  • Actions:
    • Set temp_point=(Center of Region)
    • Unit - Order Hero to go to temp_point
    • Custom script: call RemoveLocation(udg_temp_point)
You should do things on random places in the map, you need to first set that place to a variable then do anything you want with that variable, then clear that variable out. Use
call RemoveLocation(udg_HERENAMEOFAVARIABLE)
call RemoveLocation(udg_NAMEOFVAR[INDEX_OF_AN_ARRAY_VARIABLE])
to remove temporary used regions use
call RemoveRect(udg_VAR_OF_TYPE_REGION)
to remove unit groups not used anymore use
call DestroyGroup(udg_VARIABLE)
to destroy a trigger that runs only one time for the entire game use
call DestroyTrigger(GetTriggeringTrigger())

and refer to this page: http://www.hiveworkshop.com/forums/triggers-and-scripts-269/things-that-leak-35124/ for detailed information about all kinds of leaks.
 
Status
Not open for further replies.
Top