Blockland Forums > Modification Help
Need help finding a JVS indicator
Bloxxed:
Hey, I need to find a indicator to determine whether the brick is a JVS brick or not.
If you can help, thanks.
DrenDran:
Look at it.
Look at brick menu under JVS category.
See if brick in question is on menu.
Make descision.
edit: oh no wait you wanted a variable or something, one second
Try this:
--- Code: ---function iscontent(%brick)
{
if(strpos(16035.getDatablock().getname(),"content") != -1)
return 1;
else
return 0;
}
--- End code ---
All JVS bricks are apparently supposed to contain the word "content" as a part of their datablock.
As far as I know only JVS bricks have that distinction.
Add the function to your script, and you can simply do:
echo(iscontent($mybrick));
for example, to try it.
PNetwork2011:
--- Quote from: Bloxxed on June 28, 2011, 01:23:06 PM ---Hey, I need to find a indicator to determine whether the brick is a JVS brick or not.
If you can help, thanks.
--- End quote ---
oh man DrenDran beat me to it
Bloxxed:
--- Quote from: PNetwork2011 on June 28, 2011, 01:43:08 PM ---oh man DrenDran beat me to it
--- End quote ---
I doubt you can script anyway.
No, what I am trying to do is I'm making a lockpick but I'm trying to edit it in some ways, but I need to know to see if the door is a JVS door, so basically
if(%col.JVSdoor);
But I don't know the indicator.
PNetwork2011:
--- Quote from: Bloxxed on June 29, 2011, 11:04:26 AM ---I doubt you can script anyway.
No, what I am trying to do is I'm making a lockpick but I'm trying to edit it in some ways, but I need to know to see if the door is a JVS door, so basically
if(%col.JVSdoor);
But I don't know the indicator.
--- End quote ---
--- Quote from: DrenDran ---
function iscontent(%brick)
{
if(strpos(16035.getDatablock().getname(),"content") != -1)
return 1;
else
return 0;
}
Return as 1 or 0 and if it returns as 1 make some code along with that to contentStart
--- End quote ---