| Blockland Forums > Modification Help |
| Killing all of a kind of brick |
| (1/1) |
| adam savage:
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. |
| Jardev:
You could check out Script_ClearSpam to figure this out, but here is a snippet of what you are looking for: --- Code: --- //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); --- End code --- |
| phflack:
similar to this |
| Navigation |
| Message Index |