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

[Trigger] Location leaks

Status
Not open for further replies.
Level 5
Joined
Jul 17, 2006
Messages
145
If i create a special effect at a location, i know that it creates the location that then leaks unless i remove it. but what i also want to know:

If i create a special effect on the "origin of a unit" does the location stay there once i remove the special effect? if so, what type of variable would i use to set this location.

If i create a special effect or unit in the center of a region, is a location created or does it just use the region. what if i create it in a region with an offset?

thank you for any help ^^
 
Level 11
Joined
Jul 12, 2005
Messages
764
Yeah, HappyTauren is right. Many people don't know that special effects affect gameplay more radically than location leaks. If you create a special effect, its model remains, eating graphical memory (or kinda... i'm not an expert... it's bad, ok? :D ). So be careful with special effects, even with the ones that do not have a duration, like ThunderClap's effect or many spell-effects. These must be removed! Note that, if you remove these S.E.s instantly, they will still go off, their animation will not break!
  • :
  • Special effect - Create special effect at <position> using <model>
  • Special effect - Destroy (Last created special effect)
If you have a duration effect, like buffs' effects, store them into a variable, and destroy them later.
 
Last edited by a moderator:
Level 40
Joined
Dec 14, 2005
Messages
10,532
To answer you more specifically --

Creating it on a point, you have both the Special Effect and the Location to deal with.

Creating it on a unit, it doesn't need a point - it follows the unit. You only have the Special Effect to deal with.

Creating it in a region, you're just turning the region's center into a Location, so you again have both the Special Effect and Location to deal with.
 
Level 5
Joined
Jul 17, 2006
Messages
145
alright thank you purplepoot for answering my question :wink:
anyways i already know i need to destroy special effects and locations, but i dident know which locations i needed to destroy. For example: A region is a location, and is stored in much the same way as a global variable. Therefore, is a new point variable created when i target the center of a region? anyways thanks for all your help.
 
Level 7
Joined
Jun 4, 2006
Messages
127
Leaks on GUI

You have to set a variable to the point/region so that the custom scripts would work..
If location is point then use
  • Custom script: call RemoveLocation(udg_VarPoint)
If location is region then use
  • Custom script: call RemoveRect(udg_VarPoint)
 
Last edited by a moderator:
Status
Not open for further replies.
Top