| Blockland Forums > Modification Help |
| Spawn bricks with an ownership |
| << < (2/3) > >> |
| cciamlazy:
well it cant really tell what it will be but yes it needs a brick ownership. |
| Daenth:
I'll assume he has code which spawns a brick (no idea why, how, or for what reason) but it appears to be under "no ownership." He's trying to get ownership on it, but cannot figure out how. If I'm wrong, correct me. Just a tip for the future, don't be so vague. The more straight-forward the question the better response you'll get. If you don't know what you are trying to do, you can't ask questions and therefore you shouldn't be making topics; unless you're trying to ask for ideas, in which case they shouldn't be posted here. ;) If you're "borrowing" code or viewing the code and cannot figure out what it does (I suspect it might be this) post the bit of code you don't understand and simply ask, "What does this do?" |
| Greek2me:
--- Quote from: cciamlazy on June 13, 2011, 12:14:34 AM ---I have something that spawns bricks behind it and whatever I try it wont add the id. please help. --- End quote --- Okay, so you have something (a plane maybe?) that as it moves, bricks are planted behind it, but they have no owner. You need the bricks to be owned by the person (driving the plane?). Try adding the bricks to the person's brickgroup and see what happens. You'd do that like so: %client.brickGroup.add(%brick); |
| otto-san:
--- Code: ---%brick = new fxDTSBrick() { position = position here; client = %client; }; %brick.plant(); --- End code --- isn't it |
| Xalos:
--- Quote from: otto-san on June 14, 2011, 07:25:30 PM --- --- Code: ---%brick = new fxDTSBrick() { position = position here; client = %client; }; %brick.plant(); --- End code --- isn't it --- End quote --- Sure, if you don't mind not getting a brick. With pretty much everything that has an actual physical object, you NEED a datablock. In this case, that's any fxDtsBrickData object. Let's use brick2x2fData... --- Code: ---%brick = new fxDtsBrick() { datablock = brick2x2fData; position = "0 0 10"; angleID = 0; //Not actually needed here because this brick is the same all four ways, but this is how to turn it. client = %client; isPlanted = 1; }; %brick.plant(); %client.brickgroup.add(%brick); --- End code --- |
| Navigation |
| Message Index |
| Next page |
| Previous page |