| Blockland Forums > Modification Help |
| Getting the brick number from the brick name |
| (1/5) > >> |
| Nexus:
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 |
| Red_Guy:
what do you mean by "brick number" ? |
| Nexus:
--- Quote from: Red_Guy on June 22, 2011, 08:22:34 PM ---what do you mean by "brick number" ? --- End quote --- I tried to explain that, and it was actually something I was unaware of until recently. The brick number is how the client tells the server what brick it is trying to use. If you join a server, spawn, and then go into the GUI editor and open the brickselectordialogue, you will see that every brick icon has a unique number in the command. The command "\instantusebrick ###" is the fastest way to translate that number into a ghost brick, but I do not know how to find the number of the brick that I need within a script. |
| Red_Guy:
... I still dont get it. you can look at a brick and say /getid it will give you a number in chat. but thats only good for your current session of blockland. You say you need this brick number for your script. what are you trying to do in your script? it almost sounds like you want a /command to change your ghost brick. |
| Nexus:
--- Quote from: Red_Guy on June 22, 2011, 08:30:35 PM ---... I still dont get it. you can look at a brick and say /getid it will give you a number in chat. but thats only good for your current session of blockland. You say you need this brick number for your script. what are you trying to do in your script? it almost sounds like you want a /command to change your ghost brick. --- End quote --- That is the brick's ID what I need is the number that the server gives to each type of brick. Really, the best way to explain this is that for each brickdata, there is a number that identifys what that is, so the client can tell the server that it wants to use the brick with the number 201, and the server translates that into the 1x1 brick. If you still don't understand it, then play around with "/instantusebrick ###" and you will see what I am talking about. --- Quote from: Red_Guy on June 22, 2011, 08:30:35 PM ---it almost sounds like you want a /command to change your ghost brick. --- End quote --- that couldnt be more exactly what I am asking for, except i have the /command, i just need a way to determine the argument |
| Navigation |
| Message Index |
| Next page |