Blockland Forums > Modification Help
A stupid question regarding fetching the Category name
Randomness:
I was working on a little something and I feel like I came to a roadblock. For what I need to do, I need to pull the category name from a brick (getCategory, sort of) and store it in a variable to compare it to something which to me seems a little sloppy but it works.
Can anyone elaborate more on this? I feel like the solution is simple and I'm an idiot.
otto-san:
The category and sub-category are stored on the datablock.
%brick.getDatablock().category and %brick.getDatablock().subCategory should work.
Randomness:
--- Quote from: otto-san on May 30, 2012, 04:37:42 PM ---The category and sub-category are stored on the datablock.
%brick.getDatablock().category and %brick.getDatablock().subCategory should work.
--- End quote ---
Oh thank god, I fixed it. The line I needed was %col.getDatablock().category = "JVS". Thank you.
otto-san:
--- Quote from: Randomness on May 30, 2012, 04:53:16 PM ---Oh thank god, I fixed it. The line I needed was %col.getDatablock().category = "JVS". Thank you.
--- End quote ---
...?
That'll make the datablock move to the JVS category, do you mean $=?
Randomness:
Yes, I meant $=. I didnt go back to edit my post so now I look stupid. Great.
Thanks anyway.
Topic Locked.
...Topic Unlocked, because it appears I cant code worth a crap.
Is there an easy way to clear the client's ghost brick via script? I've searched this sub-forum and found nothing related to what I needed.