- Joined
- Jul 20, 2012
- Messages
- 83
As the title says, is it really necessary to store All Players to variable if it's used more than once in a trigger?
function GetPlayersAll takes nothing returns force
return bj_FORCE_ALL_PLAYERS
endfunction
You can also use bj_FORCE_ALL_PLAYERS which is already a global. Sure a global with a shorter name is faster but that is only if you are really a speed freak.
All I did was before picking player group (all players) I stored All Players to TempPlayerGroup and after the function with picked player I destroyed the temp group destroying the All Players entirely never able to be used again in the map...
Here's question, now that I know I cannot destroy TempPlayerGroup variable where All Players is stored, should I leave the TempPlayerGroup without the destroying script and when I overwrite that variable with any other player group that is not All Players but only players that are playing for example I can destroy it (when it's not players of control a.k.a. All Players or Allies/Enemies of (player)) with that script?
Thanks doomlord
@TO
As I said above store all players to a permanent player force global.
Never destroy all players. Plz read above posts again