HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

select all palyers?

02-18-2003, 03:10 AM#1
SkylineGT[FB]
is there a trigger that can happen to all playes exept player 10, 11, and 12? cause every time i do a trigger that aplies to players 1-8, i have to make one for each player. and its geting kinda lame. would i use variables?
02-18-2003, 06:03 PM#2
Aiursrage2k
I would suggest using player(index), and a loop.

a quick example

Code:
function spawn takes nothing returns nothing
local integer i = 1
loop
   exitwhen i > 8

   // Do something in this case spawn, syntax 
   //may not be correct since no editor in front of me

   create 1 unit player(i) at region[i] facing angle default
   i = i + 1
endloop
endfunction

call spawn
02-18-2003, 07:09 PM#3
Electromancer
Well, for basic triggers, you could do this. Integer A - 1-8 Pick all players in ingame and do if picked player equal to integer a then do whatever else do nothing
02-18-2003, 07:39 PM#4
SkylineGT[FB]
well, i guess u could call this sad, but i dont know how to use variables. is there like a tutrial or sumthing? or can some one tell me how to use variables?
02-18-2003, 07:48 PM#5
Milkman
Push the yellow X button in the trigger menu.
Chose New Variable
Pick Player Group as type and name it to Players, then press ok
Next, create a trigger named Players:
EVENTS:
Map Init
Actions
Player- Add Player 1 red to Players(variable)
Player- Add Player 2 blue to Players(variable)
and so on...

EDIT: then when u want to use theese players use the variable instead...

U can also add or subtract players from the group later or use several groups
02-18-2003, 08:06 PM#6
SkylineGT[FB]
:ohh: :dance: im happy! thx sooo much!!!!