Author Topic: Brick ID  (Read 1244 times)

This is more of a console question than actual coding, but it still involved torque, so here goes. Is there an easy way to find the ID of a brick after you plant it? Or is there a function like findClientByName() that works using a brick's name as a substitute for it's ID?

Look at the brick, and in your chat, type /getid

Thank you! Is there also a way to refer to a brick in the console by it's name? Like findClientByName();?

Thank you! Is there also a way to refer to a brick in the console by it's name? Like findClientByName();?

Well, let's say you name a brick, brick.

you can do echo(_brick.getclassname());

Brick is named Hi anoob
In console
_Hi_anoob.blah();
or
Bricks ID is 37263
In console
37263.blah():


Look at the brick, and in your chat, type /getid
Admeen ownleh

One more question, I was asking these questions to more specifically find out if you could do ClientCmdOpenWrenchDLg(); and specify a brick to change the properties of the brick without using a wrench. I got this to work on one brick on a single player server (could not specify which brick by name or ID, and so it defaulted at the first brick planted), and not at all on someone else's server. Apparently the first argument of the command is simply the text at the top of the menu. Is it at all possible to do something like this and change the properties on a brick without having a wrench item/saying /wrench/ using a swiss army gun or something like that?

Yeah, what exactly do you want to change?

Anything xD The item, the name, the rendering settings etc. Without using a wrench.

Anything xD The item, the name, the rendering settings etc. Without using a wrench.

Yeah, %brick.setItem(..itemdata..); %brick.setRendering(..boolean..); etc. Do %brick.dump(); and look in the console to see all of the functions you can do.

Could'nt someone make an eventbot as a builbot extension?

Oh, sorry that you didn't understand this, but the clientCmdOpenWrenchDlg(); opens up the wrench GUI and it let me change aspects of the brick through that. Also I just realized I did it wrong earlier, and you actually can specify the name of the brick with the first argument. So saying clientCmdOpenWrenchDlg(Hello); in the console will open up the wrench GUI and let you change the properties of the brick named "Hello", at least when you are host.

Oh, sorry that you didn't understand this, but the clientCmdOpenWrenchDlg(); opens up the wrench GUI and it let me change aspects of the brick through that. Also I just realized I did it wrong earlier, and you actually can specify the name of the brick with the first argument. So saying clientCmdOpenWrenchDlg(Hello); in the console will open up the wrench GUI and let you change the properties of the brick named "Hello", at least when you are host.
Have the ID of the brick, and the brick has to be yours, the it gonna work on any server.

It does! Yay! :D Now I just need a way to find the ID of my brick on another server, or a way to name a brick as I plant it, and I won't need a wrench anymore/can change the properties of bricks on servers that don't allow you to have a wrench. Thank you guys!