Author Topic: How to find the owner of a brick?  (Read 1780 times)

How do I find the owner of a brick?

Code: [Select]
findClientByBL_ID(%this.stackBL_ID).Player.kill();
...would kill the brick's owner. The owner's BL ID is...

Code: [Select]
%this.stackBL_ID

Code: [Select]
findClientByBL_ID(%this.stackBL_ID).Player.kill();
...would kill the brick's owner. The owner's BL ID is...

Code: [Select]
%this.stackBL_ID

ty

is there a way to find the owner and not bl_id?

is there a way to find the owner and not bl_id?

Not exactly.

I think you can do %brick.brickgroup.client, but don't quote me on that, since I can't be bothered to open up  blockland to help someone I don't know I've never heard of.
« Last Edit: April 06, 2009, 10:23:59 PM by laremere »

Code: [Select]
%brick.clientBut I think that wouldn't work if the owner was not on the server so you should use what laremere said.
The brickgroups have the following owner traits:
%group.BL_ID
%group.name
and
%group.client
« Last Edit: April 06, 2009, 10:09:27 PM by Destiny/Zack0Wack0 »

:D :D :D :D Thanks

I was in error with my previous post. I decided to care enough to look into the matter, and it turns out you find the owner of a brick with %brick.client, as %brick.brickgroup is not set to the brick.  You need to use %brick.client.

You can use %brick.getGroup() to get the brick group too.

wouldn't
Code: [Select]
getBrickGroupFromObject(%this).client work?

It works fine. thanks guys
« Last Edit: April 06, 2009, 10:46:47 PM by Pew446 »

I was in error with my previous post. I decided to care enough to look into the matter, and it turns out you find the owner of a brick with %brick.client, as %brick.brickgroup is not set to the brick.  You need to use %brick.client.
I think that's only set if you build the brick in-server, not loaded builds.

I generally use %brick.getGroup().client