Author Topic: How would I go about making certain individual bricks public?  (Read 1200 times)

For those that don't know what a public brick is. When loading saves, You have the option of making all bricks 'Public'. Making a brick public allows for players to build on them but they can't paint or destroy them.

Now the issue I'm having is that I want to make individual bricks public but I don't know how I would go about doing it. I'm assuming I would have to delete all bricks but the ones I want to make public but that isn't such an easy task when you're working with over 60k bricks. So at this point I'm wondering if there is an easier way to making individual bricks public. Maybe via events and named bricks? Or maybe some kind of a hidden feature that I don't know about that would make things a lot easier.

So lets say that in this 7 * 9 of bricks. I want only the orange bricks to be public.

Instead of performing 60 actions deleting all the bricks around those, I want to be able to only have to perform 3 actions.
« Last Edit: May 05, 2016, 03:02:34 PM by Sentry »

Would have to script something to do it.

Would have to script something to do it.
maybe like, a "Publicifier Wand"?

that could be useful

wouldn't the brickgroup wand work for this?

wouldn't the brickgroup wand work for this?
Good idea! That might work. Try using it with /setBGID 888888(The BL ID for the public brick group).

I'll try it out. I'll post results.

The brickgroup wand is missing a projectile on my server for some reason. I think.
When I hit bricks after setting the brick group id to 888888 or anything else it doesn't change it at all.
There is no feedback from the wand that I hit the brick either which is why I assume it doesn't have a projectile.

What if we had a script made where if you type in /setpb [brickname] it would change all bricks named after what you put in the parameter into public bricks. I'd prefer if the command was host only.
« Last Edit: May 05, 2016, 03:41:53 PM by Sentry »

Code: [Select]
function serverCmdSetPB(%cl, %brickName)
{
if(!%cl.isSuperAdmin)
return;

if(%brickName $= "")
{
messageClient(%cl, '', "Input a brick name.");
return;
}
%public = BrickGroup_888888;
%count = 0;

for(%i=0; %i < mainBrickGroup.getCount(); %i++)
{
%brickGroup = mainBrickGroup.getObject(%i);
for(%j=0; %j < %brickGroup.getCount(); %j++)
{
if(%brickGroup.getName() $= %public)
continue;

%brick = %brickGroup.getObject(%j);
if("_" @ %brickName $= %brick.getName())
{
%j--;
%brick.brickGroup.remove(%brick);
%public.add(%brick);
%count++;
}
}
}
messageClient(%cl, '', "Set" SPC %count SPC "bricks to public.");
}
This should work.

-snip-
This should work.
It works! You're a saint. <3

I'll try it out. I'll post results.

The brickgroup wand is missing a projectile on my server for some reason. I think.
When I hit bricks after setting the brick group id to 888888 or anything else it doesn't change it at all.
There is no feedback from the wand that I hit the brick either which is why I assume it doesn't have a projectile.
im having this problem too on my server. not sure what it is.

There's an addon that lets you build bricks as public. I think the name is BuildPublicBricks or something. It's pretty simple and not super well made but it's good enough.

Note that with public bricks, you'll want a different save saver than the default one since anything ON the bricks will be saved as public as well. Ownership saving's weird.