Author Topic: Brick Counts  (Read 646 times)

I was wondering what I would do to find a client's brickcount. I thought it was serverConnection.getBrickCoun t, but it didn't work.

Help?

client.brickgroup.getCount();

client.brickgroup.getCount();

for(%i=0;%i<%client.brickGroup.getCount();%i++)
     %bricks+=%client.brickGroup.getObject(%i).isPlanted;

Where %bricks will be set to the count (can't include ghost bricks).

The problem with that is the fact it's a loop.

The clearbricks GUI also includes the ghost brick, it really isn't a big deal. It's just a difference of 1.
Also, my player brick limit doesn't include the ghost brick, without using a loop. :cookieMonster:

%client.brickgroup.getCount()-isObject(%client.player.brickcount);

http://forum.blockland.us/index.php?topic=79932.0

%clientBrickCount = %client.brickgroup.getCount() - isObject(%client.player.tempBrick);

You need to subtract if they have a ghost brick out.

Also SpaceGuy showed me that :)

What if someone's running a mod that uses multiple ghost bricks ;o

What if someone's running a mod that uses multiple ghost bricks ;o
Wat.

That would be handicapped.

What if someone's running a mod that uses multiple ghost bricks ;o
Then we shall put dumbass mod on.

Thanks guys, but I was wondering if it was possible as a clientside, not serverside. >_>

If not, thanks anyways :/

http://forum.blockland.us/index.php?topic=79932.0

%clientBrickCount = %client.brickgroup.getCount() - isObject(%client.player.tempBrick);

You need to subtract if they have a ghost brick out.

Also SpaceGuy showed me that :)
Oh yeah, that's what I meant to write, not "brickcount". Whoops.

Thanks guys, but I was wondering if it was possible as a clientside, not serverside. >_>

If not, thanks anyways :/
I'm pretty sure it's not possible because the trust system/brickgroups are handled server-side.

I'm pretty sure it's not possible because the trust system/brickgroups are handled server-side.
Oh, thanks.. :/

Will lock.