HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Leaking Variables??

10-29-2006, 03:15 AM#1
GamesSmash
Can someone please tell me if this function leaks:
Trigger:
Trigger
Collapse Events
Unit - A unit enters region
Collapse Conditions

Collapse Actions
Set Temp_Player = (Owner of (Entering unit))
Player - 1000 gold to temp_player
wait 5 seconds
Set Temp_Player = (Owner of (Entering unit))
Player - 1000 gold to temp_player

Also, does attaching a sword to a units right hand work if it has a weapon in its hand?
10-29-2006, 03:32 AM#2
Jazradel
No. But (Triggering Unit) is sightly faster than (Entering Unit).

And there's not much point of using a variable at all if you change it when it's used.
Trigger:
Trigger
Collapse Events
Unit - A unit enters region
Collapse Conditions

Collapse Actions
Player - 1000 gold to (Owner of (Triggering unit))
Wait 5 seconds
Player - 1000 gold to (Owner of (Triggering unit))
Would be a slightly faster way of making it.
10-29-2006, 03:33 AM#3
Nubcookie
Quote:
Also, does attaching a sword to a units right hand work if it has a weapon in its hand?
Yes it will work but the original weapon will still be there. And I don't think that leaks...
10-29-2006, 07:16 AM#4
Captain Griffen
It is also utterly pointless. Players cannot leak, so setting it to a variable is pointless.
10-29-2006, 02:23 PM#5
GamesSmash
lets say that i set every point that i used to "temp_point" but never cleared the variable. (less variaBle=good)
10-29-2006, 02:34 PM#6
Captain Griffen
Locations (points) can leak. After you set the variable, use it, and then remove the location - custom script; call RemoveLocation(udg_temp_point).