function createDungeonBrick(%id,%db,%pos,%col,%fx) {
%pos = getWords(%pos,0,2) SPC getWord(%pos,2) - (-50*%id);
if($DG::isBrick[%pos])
return -1;
if(strLen(%fx) < 1)
%fx = 0;
%brick = new fxDTSBrick() {
position = %pos;
datablock = %db;
isPlanted = true;
colorId = %col;
colorFxId = %fx;
};
%err = %brick.plant();
MissionCleanup.add(%brick);
if(!isObject(BrickGroup_88)) {
new SimGroup(BrickGroup_88) {
name = "Dungeon Generator";
bl_id = 88;
};
MainBrickGroup.add(BrickGroup_88);
}
BrickGroup_88.add(%brick);
$DG::isBrick[%pos] = true;
return %brick;
}
you need a client for the brick to work right.
Also make sure the 'Z' position of your brick is above ground (greater than 0).
Lastly -- plant a regular brick, use /getid to get the obj id for it. do a dump() in console and look to see what the properties are for the brick. Then make sure your code uses those values.
v21 changed the rules when creating bricks from script, so a lot of the old ways wont work.