Author Topic: Floating Bricks - "Unplanted Behavior" as of v21.  (Read 829 times)

I have a script which relies on creating floating bricks. Creating the actual bricks work, and they look as if they are planted. However, they behave as if they are ghost bricks (/getID doesn't notice them, no collision, no ray casting, etc). Interestingly, a few seemingly random bricks have proper collision and work as expected.

Code: [Select]
%obj = new fxDTSBrick()
{
position = %x * 2 SPC %y * 2 SPC %z;
datablock = brick4xCubeData;

colorId = %c;
isPlanted = true;
};

brickGroup_888888.add( %obj );
%obj.plant();

I've tried using a queue and only placing one brick every second (to see if it was due to the rate of brick creation), which doesn't fix it and even removes the few random working bricks.
« Last Edit: August 30, 2012, 10:26:10 AM by Port »

I had an issue like this with my Crumbling Stage mod, it always had a random brick that doesn't return anything when I use /getid.

This was before V21 as well.
« Last Edit: August 30, 2012, 12:05:00 PM by nerraD »

I ran into the same issue with my mining mod.

- make sure you bricks are ABOVE ground.  if any part is below the ground plane, you get a "ghost"
- try doing %brick.plant()  first, and then add to brick group
- make sure the brick group gets added to mainbrickgroup

so something like so:
Code: [Select]
mainBrickGroup.add(brickGroup_888888);  <== do this ONLY ONCE!!

%obj = new fxDTSBrick()
{
       client = <something>   <== this seems to be required now
position = %x * 2 SPC %y * 2 SPC %z;
datablock = brick4xCubeData;

colorId = %c;
isPlanted = 1;
};
%obj.plant();
brickGroup_888888.add( %obj );

%brick.plant will fruck up sometimes if its in air

- make sure you bricks are ABOVE ground.  if any part is below the ground plane, you get a "ghost"

there is no reason to put anything below the ground anyway

- try doing %brick.plant()  first, and then add to brick group

tried both

- make sure the brick group gets added to mainbrickgroup

the public brick group is automatically created and added to the main brick group, no need to do that in your game-mode manually

Code: [Select]
client = <something>   <== this seems to be required now

i'll try this later

the public brick group is automatically created and added to the main brick group, no need to do that in your game-mode manually
On single player or lan games - thats correct.
but its not the case in a dedicated server (I have big problems with this in my mining server).