31
Modification Help / Getting the brick number from the brick name
« on: June 22, 2011, 07:06:02 PM »
I am in the need of a system that can figure out what a brick's number is given the name of the brick. For example, I have found that the first brick, 1x1, is always number 201, and it increases sequentially from there. If I only wanted default bricks to work, I could just have a giant switch to change each brick name into the appropriate number, but addons are not always enabled, and the numbers of non-default bricks can change from server to server. I am stumped as to how to find the brick number, since this number does not appear to exist on the client side outsode of the brick selector dialogue.
example of what I'm talking about:
type "/instantusebrick 201" and click the ground
a 1x1 ghost brick will appear
now type "/instantusebrick 202"
the ghost brick will turn into a 1x2 brick
example of what I'm talking about:
type "/instantusebrick 201" and click the ground
a 1x1 ghost brick will appear
now type "/instantusebrick 202"
the ghost brick will turn into a 1x2 brick