HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

When do you need to unleak points?

07-25-2008, 05:22 PM#1
Kino
Ok im very bad at triggering so heres what i need to know.

If i set a Eg. Point 1 = Centre of Region
and want to refer to that exact same point for the rest of the game, do i need to unleak the point?

Also Im making a TD and i need to know how to make the creeps attack the towers when they are blocked.
Currently they chop down the whole damn maze if interupted.
07-25-2008, 05:26 PM#2
Alexander244
Quote:
Originally Posted by Kinorhynkar
If i set a Eg. Point 1 = Centre of Region
and want to refer to that exact same point for the rest of the game, do i need to unleak the point?
Two locations with the same co-ordinates are seperate handles. Best bet is to just set the point to a variable.
Quote:
Originally Posted by Kinorhynkar
Also Im making a TD and i need to know how to make the creeps attack the towers when they are blocked.
Currently they chop down the whole damn maze if interupted.
When a tower dies order the killer to move to the finish.
07-25-2008, 05:37 PM#3
Hydrolisk
If you're going to use the same point variable whose position would be static (as in, you won't reset it to another position, even if it's the same position), then you only need to set it once and you don't need to clean the memory. (From my understanding.)

Make certain to check if the killer is an enemy of the tower's player.
07-25-2008, 08:05 PM#4
Ammorth
As long as you do
Trigger:
Set Point 1 = Center of ( Your Region )

only once, and not every time you need it, you don't have to destroy it.

if you do

Trigger:
UnitMove 01
Collapse Events
Unit - A unit enters (Your Region)
Conditions
Collapse Actions
Set Point 1 = Center of (Your Region)
Unit - Order unit to move to (Point 1)

then you have to clean the point since you create a new point every time the trigger runs.

Trigger:
UnitMove 01
Collapse Events
Unit - A unit enters (Your Region)
Conditions
Collapse Actions
Set Point 1 = Center of (Your Region)
Unit - Order unit to move to ( Point 1 )
Custom Script: call RemoveLocation(udg_Point_1)
07-26-2008, 01:36 AM#5
SeruK
I don't know about you guys, but I feel better creating a temporary point and then destroying it. Y'know, let it do it's thing then have it out of the way.
07-26-2008, 02:58 AM#6
Gorman
How bout this then, create it on map int, then destroy it on victory/defeat.

Then you can still feel good.