Poll

Should this be made

I would help if i could script
1 (100%)
Already started on it
0 (0%)
Done i'll Post it in a heartbeat
0 (0%)
No just no
0 (0%)

Total Members Voted: 1

Author Topic: How do i make a minigame select a random player each time to a team  (Read 721 times)

What i want is a script or gamemode that randomizes player and puts one on other time and puts other on the other team maybe something like this for(%i = 0;%i < ClientGroup.getCount();%i++)
   {
      %client = ClientGroup.getObject(%i);
      %client.isit = false;            //gotta make sure who ever was it last game isn't it anymore
      %client.isPlaying = true;
      %client.lasttag = "";
      %client.frozen = false;
      if(isObject(%client.player))
      {
      %client.player.setShapeNameColor(%client,"");
      %client.player.changedatablock("PlayerStandardArmor");
      }
   }

   %client = ClientGroup.getObject(getRandom(0,ClientGroup.getCount()-1));   //select a random person
   %client.isit = true;               //make him it
   if(isObject(%client.player))
   %client.player.setShapeNameColor(%client,"");
   messageall('',%client.name @ " is the first tagger!");   //and tell everyone about it


« Last Edit: June 20, 2011, 10:01:06 PM by MonkeyFunkyMonkey »



i did he told me to post here
Post in coding help, I'm not a private torquescript instructor or something.

%clientcount = ClientGroup.getCount() - 1;
%i = getRandom(0,%clientcount);
%randomperson = ClientGroup.getObject(%i);

This should work.

how exactly do i apply it too a gamemode

oops i should of added too a team to title


if i were to use this with the tdm mod how would i

if i were to use this with the tdm mod how would i
Make your own script to run alongside TDM.

EDIT: If you are just going to ask for the whole script to be made for you, I recommend going to S&R as you're suggesting an add-on to be made.
« Last Edit: June 21, 2011, 02:18:46 AM by Daenth »