Blockland Forums > Modification Help
Getting the brick number from the brick name
Destiny/Zack0Wack0:
serverconnection.getObject(%i).getID();
I thought that was obvious.
Nexus:
--- Quote from: Destiny/Zack0Wack0 on June 24, 2011, 08:19:37 PM ---serverconnection.getObject(%i).getID();
I thought that was obvious.
--- End quote ---
Ok, not only do I already know that, but it only gets a useless ID on the client side. I really don't want to have to read this same answer over and over. I already posted my solution, Destiny.
Nexus:
unlocking because it seems my issue is not solved.
I would like to remind any posters that any use of .getid(); will almost definetly result in a useless client side variable that does no good in finding the id of the datablock in the server.
I have been using that code, but I have found it to no longer work. There does not seem to be any pattern to how the datablocks are set up in ServerConnection. I have been able to identify the datablocks of placed bricks by typing this right after placing the brick:
--- Code: ---echo(serverconnection.getobject(serverconnection.getcount()-1).getdatablock());
--- End code ---
But this method is not practical in a script.
How do I go from the ui name of a brick, to the server sided id of the datablock?
Red_Guy:
--- Quote from: Nexus on June 27, 2011, 01:31:35 AM ---But this method is not practical in a script.
How do I go from the ui name of a brick, to the server sided id of the datablock?
--- End quote ---
And just to make sure I understand -- you want this to be CLIENT ONLY? ... right?
Nexus:
--- Quote from: Red_Guy on June 27, 2011, 02:41:10 PM ---And just to make sure I understand -- you want this to be CLIENT ONLY? ... right?
--- End quote ---
--- Quote from: Nexus on June 22, 2011, 08:06:02 PM ---/instantusebrick
--- End quote ---
This requires the Server Sided ID of the datablock. Server cannot tell the server that it is instantly using a brick. It is client sided.