Author Topic: Killing all of a kind of brick  (Read 497 times)

Say I wanted to destroy all of the pine trees in my server, but no other bricks.

I have no clue how it would work, It would need a "for()" in it though.

You could check out Script_ClearSpam to figure this out, but here is a snippet of what you are looking for:
Code: [Select]
   //loop through all bricks
   %groupCount = MainBrickGroup.getCount();
   for(%i = 0; %i < %groupCount; %i++)
   {
      %group = MainBrickGroup.getObject(%i);
      %count = %group.getCount();
      for(%j = 0; %j < %count; %j++)
      {
         %brick = %group.getObject(%j);