Blockland Forums > Modification Help
Trying to make a brick but it's not appearing....
DrenDran:
--- Quote from: Bauklotz on July 04, 2010, 10:02:21 AM ---This worked for me:
--- Code: ---%brk = new fxDTSBrick()
{
position = ijuststuffbrix;
datablock = brick4x4Fdata;
};
%brk.plant();
--- End code ---
Replace position with what you want though, and datablock too.
--- End quote ---
--- Code: ---function serverCmdmakeabrick(%client)
{
messageclient(%client,'',"Hello..");
%pxp = mFloor(getWord(%client.player.getTransform(),0));
%pyp = mFloor(getWord(%client.player.getTransform(),1));
%brk = new fxDTSBrick()
{
position = %pxp SPC %pyp SPC 10;
datablock = brick4x4Fdata;
};
%brk.plant();
}
--- End code ---
Strangely enough that doesn't do anything for me.
--- Code: ---function serverCmdmakeabrick(%client)
{
messageclient(%client,'',"Hello...");
%pxp = mFloor(getWord(%client.player.getTransform(),0));
%pyp = mFloor(getWord(%client.player.getTransform(),1));
%brick = new fxDTSBrick()
{
client = %client;
datablock = "brick4xCubeData";
position = %pxp SPC %pyp SPC "10";
rotation = "0 0 0 0";
colorID = 6;
scale = "1 1 1";
angleID = "0";
colorfxID = "0";
shapefxID = "0";
};
%brick.plant();
$server::BrickCount++;
}
--- End code ---
And neither does that.
(except they both say hello)
I guess I'll do what Ephialtes is saying and look at other mods.
DrenDran:
My problem wasn't with the code at all!
It was just that I was making the brick 270 studs below the ground!
(though Ephialtes is probably right on what he said)
Destiny/Zack0Wack0:
You don't have to floor the position ever. The brick will automatically snap to the grid.
DrenDran:
--- Quote from: Destiny/Zack0Wack0 on July 04, 2010, 05:10:34 PM ---You don't have to floor the position ever. The brick will automatically snap to the grid.
--- End quote ---
I understand that but I need to make sure they are rounded down always, as that's how the rest of the mod that I needed this for works.
Bauklotz:
--- Quote from: DrenDran link=topic=117939.msg2456914#msg2456914 ---position = %pxp SPC %pyp SPC 10;
--- End quote ---
Floating bricks. As far as the brick datablock is a plate, just use the player height. I could maybe dig up the /fire command from World RPG.