HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Some questions..

06-16-2006, 01:06 PM#1
Soultaker
Hey again..

1. In GUI, if you use a local (global) variable like this:
Trigger:
Custom script: local integer i
Would it then still be affected if I use it as another local variable somewhere else?

2. Sorry for asking this again, but I can only find a method to see if the game is singleplayer, not whether it is LAN or on B-Net. Is there any such method?

3. Does the trigger conditions automaticly clean up locations and unit groups?

Example: If I check for a unit group in range of position of dying unit, would that leak twice (the unit group and location)?

EDIT: Updated with another question.

- Soultaker
06-16-2006, 01:16 PM#2
iNfraNe
1. no, local variables stay function dependant, they cannot be seen anywhere else besides inside that function.

2. not that I know of
06-16-2006, 01:48 PM#3
blu_da_noob
2) If there is more than one human player in the game, then it must be a LAN/BNet game?
06-16-2006, 01:57 PM#4
shadow1500
Quote:
2) If there is more than one human player in the game, then it must be a LAN/BNet game?
What if one human player hosts a game on bnet and then starts it with no players except himself? It will think its a singleplayer game.
You can tell if a game is made outside of singleplayer by creating a gamecache, putting a value in it, save it and then reload it, if the value is there then it was made by Singleplayer -> Custom Game. If its not then its a LAN/BNET game.
06-16-2006, 02:01 PM#5
Soultaker
Quote:
Originally Posted by shadow1500
What if one human player hosts a game on bnet and then starts it with no players except himself? It will think its a singleplayer game.
You can tell if a game is made outside of singleplayer by creating a gamecache, putting a value in it, save it and then reload it, if the value is there then it was made by Singleplayer -> Custom Game. If its not then its a LAN/BNET game.

Yes, I know that. I even found a method at WC3Jass.com to check it, but what I am looking for is whether the game is on B-Net or LAN.

About the first question, thanks iNfraNe. I'll rep ya.

EDIT: Updated with another question.

- Soultaker
06-16-2006, 04:06 PM#6
Rising_Dusk
Trigger conditions as functions do not automatically cleanup anything.
They take nothing and return booleans, so they're still normal functions that you need to cleanup variables in.