Author Topic: Bricks Placed Differently?  (Read 634 times)

It seems to me that when manually creating bricks, they don't place correctly when .plant() returns an error (1 or higher). Using the same code, I created a brick on the ground, and floating in the air. The one on the ground worked perfectly, but the one in the air had no collision and none of my items could "hit" it. Here is the code I used to place both bricks:
Code: [Select]
%temp = findClientByName(lil).player.tempBrick;
%brick = new fxDtsBrick()
{
   position = %temp.position;
   dataBlock = %temp.dataBlock;
   colorID = %temp.colorID;
   client = findClientByName(lil);
};
%brick.plant();
%brick.setTrusted(1);
%brick.isPlanted = 1;
%brick.client.brickGroup.add(%brick);
The commands /clearBricks and /clearAllBricks still seem to work though.

This hasn't happened since V15 came out, and I'm just wondering if something was changed about creating bricks?

I believe something was changed, the floating bricks created with a script I've made don't seem to be effected by tools.

I believe something was changed, the floating bricks created with a script I've made don't seem to be effected by tools.
Are you able to walk through them? I am, but it gets all choppy when I do.

Badspot most likely implemented some sneaky trick that makes it so you can't correctly plant floating bricks. Or he did it unconsciously.

Badspot most likely implemented some sneaky trick that makes it so you can't correctly plant floating bricks. Or he did it unconsciously.
It's not just floating bricks, it happens with buried, stuck, etc... Overlapping bricks act fine  when placed on the ground.

Are you able to walk through them? I am, but it gets all choppy when I do.
Same situation here. I'm using nearly identical coding (you forgot to add the brick to the undo stack, though :cookieMonster:)

Came on to see if anyone was having this problem too, but seeing this topic I just found a workaround on my own:

.plant() the brick after creation and everything seems to work out. Doesn't seem to undo any flags set like isBaseplate so seems to not be a serious problem. This is cause for celebration since 90% of scripting changes in BL patches are massive screw-overs to the modding community that follow the same twisted logic as gun control and censorship, only they're even less rational since badspot is an almighty god-creator who could do away with the problems and keep the benefits if he'd put in the effort.  :cookieMonster:

Came on to see if anyone was having this problem too, but seeing this topic I just found a workaround on my own:

.plant() the brick after creation and everything seems to work out. Doesn't seem to undo any flags set like isBaseplate so seems to not be a serious problem. This is cause for celebration since 90% of scripting changes in BL patches are massive screw-overs to the modding community that follow the same twisted logic as gun control and censorship, only they're even less rational since badspot is an almighty god-creator who could do away with the problems and keep the benefits if he'd put in the effort.  :cookieMonster:
I'll have to try that later. Do you mean calling .plant() twice? Or just at the end of everything?

Came on to see if anyone was having this problem too, but seeing this topic I just found a workaround on my own:

.plant() the brick after creation and everything seems to work out. Doesn't seem to undo any flags set like isBaseplate so seems to not be a serious problem. This is cause for celebration since 90% of scripting changes in BL patches are massive screw-overs to the modding community that follow the same twisted logic as gun control and censorship, only they're even less rational since badspot is an almighty god-creator who could do away with the problems and keep the benefits if he'd put in the effort.  :cookieMonster:
None of the changes badspot has made, have ever radically affected my scripts (with the exception of the zip file based system, which I think we all love).

I'll have to try that later. Do you mean calling .plant() twice? Or just at the end of everything?
Nvm, calling .plant() last seems to fix it. Thanks Mr. Wallet.