Author Topic: Building a brick from nothing?  (Read 2298 times)

Code: [Select]
%f = new fxDTSBrick()
{
angleID = 2;
arrayPos = 0 SPC 0 SPC 0;
client = 0;
colorFxID = 0;
colorID = 53;
dataBlock = brick8xCubeData;
isBaseplate = true;
isPlanted = false;
position = getRandom(0,10000000) SPC getRandom(0,10000000) SPC getRandom(0,10000000);
printID = 0;
rotation = 0 SPC 0 SPC 1 SPC 180;
scale = 1 SPC 1 SPC 1;
shapeFxID = 0;
};
%f.setTransform(0 SPC 0 SPC 0);
lolBrickGroup.add(%f);
%f.setTrusted(1);
%f.plant();
This is the code I have - a ghost brick appears, but it won't seem to plant. I am getting no errors about it, and all the code should work. Is there anything I'm doing wrong with it?


This should probably be true.
Alright, i'll try that out.
Edit: It did, thanks :D
« Last Edit: May 27, 2009, 04:34:57 PM by Azimuth »

Thanks Azi, that could be useful.

Try this.

Code: [Select]
new fxdtsBrick(Brick)
{
isPlanted=true;
datablock=Chooseadatablock
};
brick.plant();

Change Chooseadatablock with any brick datablock....