Blockland Forums > Modification Help
Trying to make a brick but it's not appearing....
Red_Guy:
copy-paste from my RTB forum post:
Floating brick script:
--- Code: ---function serverCmdFloatBrick(%client, %h)
{
%brick = %client.player.tempBrick;
%pos = %brick.getPosition();
%newPos = VectorAdd(%pos, "0 0 "@ %h );
%newBrick = new fxDtsBrick()
{
position = %newpos;
rotation = %brick.rotation;
dataBlock = %brick.getDataBlock();
angleId = %brick.angleId;
colorId = %brick.colorId;
colorFxId = %brick.colorFxId;
shapeFxId = %brick.colorFxId;
client = %client;
};
%newBrick.plant();
%newBrick.setTrusted(1);
%client.brickGroup.add(%newBrick);
}
--- End code ---
how to use:
- place a ghost brick.
- type: /floatbrick <number>
this makes a floating brick above your temp brick.
You can build on it just fine -- but you cannot hammer it.
If you build a brick on it, and then undo that brick the whole thing will be destroyed.
Use at your own risk & Enjoy!
Chrono:
You also need to set rendering and collision and whatnot.
Plornt:
This is how i make my bricks.
--- Code: ---%brick=new fxDTSbrick()
{
client=%client;
dataBlock= %this.getDatablock();
isBaseplate= %this.isBasePlate;
position= %positionX SPC %positionY SPC %positionZ;
rotation=%this.rotation;
scale="1 1 1";
colorID = %this.getColorID();
colorFXID = %this.getColorFXID();
printid = %this.printid;
};
%brick.setTrusted(1);
%brick.plant();
%client.brickGroup.add(%brick);
$Server::BrickCount++;
--- End code ---
spartan101:
--- Quote from: Plornt on July 06, 2010, 06:08:08 PM ---This is how i make my bricks.
--- Code: ---%brick=new fxDTSbrick()
{
client=%client;
dataBlock= %this.getDatablock();
isBaseplate= %this.isBasePlate;
position= %positionX SPC %positionY SPC %positionZ;
rotation=%this.rotation;
scale="1 1 1";
colorID = %this.getColorID();
colorFXID = %this.getColorFXID();
printid = %this.printid;
};
%brick.setTrusted(1);
%brick.plant();
%client.brickGroup.add(%brick);
$Server::BrickCount++;
--- End code ---
--- End quote ---
Me two but I rarely make brick's :P