Blockland Forums > Modification Help
Brick variable for name?
(1/1)
otto-san:
%brick.name doesn't seem to work, what would be the right way to get this?
Tezuni 2.0:
You mean the datablock?

For example:


--- Code: ---if(%brick.getdatablock().getID()!= Brick32x32FRoadXData.getID())
  {
       echo("It's not a 4 way road piece!");
   }
--- End code ---

That would check if the brick is not a 4 way road brick.
Hope that helps! :-)
Destiny/Zack0Wack0:

--- Code: ---%name = %brick.getName();
%nameLen = strLen(%name);
if(%nameLen > 1)
        %brickName = getSubStr(%name,1,%nameLen - 1);

--- End code ---
otto-san:

--- Quote from: Destiny/Zack0Wack0 on June 26, 2011, 09:04:49 PM ---
--- Code: ---%name = %brick.getName();
%nameLen = strLen(%name);
if(%nameLen > 1)
        %brickName = getSubStr(%name,1,%nameLen - 1);

--- End code ---

--- End quote ---
Thanks! :D
Navigation
Message Index

Go to full version