Author Topic: Need help finding a JVS indicator  (Read 818 times)

Hey, I need to find a indicator to determine whether the brick is a JVS brick or not.
If you can help, thanks.

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: [Select]
function iscontent(%brick)
{
if(strpos(16035.getDatablock().getname(),"content") != -1)
return 1;
else
return 0;
}

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.
« Last Edit: June 28, 2011, 01:44:21 PM by DrenDran »

Hey, I need to find a indicator to determine whether the brick is a JVS brick or not.
If you can help, thanks.
oh man DrenDran beat me to it
« Last Edit: June 28, 2011, 01:47:21 PM by PNetwork2011 »

oh man DrenDran beat me to it
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.

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.
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

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

You ripped that off Dren, you're just saying "oooh hurr der durp I'll just say I'm good at coding and copy someone else's code"
You're not good at scripting.
« Last Edit: June 29, 2011, 12:12:29 PM by Bloxxed »

function isJVS(%this)
{
   if(%this.getClassName() $= "fxDtsBrick")
      return %this.getDatablock().category $= "JVS";
   else if(%this.getClassName() $= "fxDtsBrickData")
      return %this.category $= "JVS";
   else
      return 0;
}

Never mind, fixed, Thanks everyone who contributed.

<3



You ripped that off Dren, you're just saying "oooh hurr der durp I'll just say I'm good at coding and copy someone else's code"
You're not good at scripting.
Double Barrel Quote.
Quote from: PNetwork2011
Quote from DrenDran: