Author Topic: Is there such a thing as local parts?  (Read 4809 times)

In roblox local parts are parts that only you can interact with. I've been trying to make DayZ on roblox, but there is not enough resources to make it as non-laggy as I like, while not sacrificing an unreasonable amount of render distance. I can auto make the map, with the roads and trees, and I was thinking of doing it on BL, but it can only be done if local parts are possible.
Are they?


We have a mechanic built in called "public bricks", where only admins can modify it if they so choose. If that's not good enough it's not impossible just to package all of the brick functionality and check the person doing it.

I'm not sure thats what I'm look for.
I'm looking for a way of making it so some bricks(thousands probably), only you can see. Although now that I think about it, since the brick limit is 256k, I may be able to just make all the bricks near all the players visible, so the whole server sees it, but it doesnt reach the limit.

If that's possible, right? In roblox you just do Model.Parent=workspace, or Model.Parent=nil. Is it that easy to remove/create bricks in bl?

You can create bricks client-sided but they won't have collision

I might be able to work with that.
Of course I dont know anything about Blockland's torquescript. Thinking like a roblox scripter.

I'm not sure thats what I'm look for.
I'm looking for a way of making it so some bricks(thousands probably), only you can see. Although now that I think about it, since the brick limit is 256k, I may be able to just make all the bricks near all the players visible, so the whole server sees it, but it doesnt reach the limit.

If that's possible, right? In roblox you just do Model.Parent=workspace, or Model.Parent=nil. Is it that easy to remove/create bricks in bl?
Oh, I see what you're asking. It's pretty easy for bricks to be added and destroyed, but they don't exist on the server as soon as you do that. You would have to save the data in some manner

Oh, I see what you're asking. It's pretty easy for bricks to be added and destroyed, but they don't exist on the server as soon as you do that. You would have to save the data in some manner
A string is the way I did it in roblox.

A string is the way I did it in roblox.
Ok. To create a brick:
Code: [Select]
        %cube = new fxDTSbrick()
{
datablock = brick4xCubeData;
position = "0 0 0";
angleID = 0;
colorID = 2;
isPlanted = 1;
};
%cube.setTrusted(1);
%cube.plant();

and to delete:
Code: [Select]
%cube.delete();

How exactly would I start a solo server, and run that code? Console didn't work for me.

Torque by default does not have Selective Ghosting (or local parts, as I guess you'd call them in Roblox) integrated into the engine. Bricks, being objects, need to be instantiated using code similar to Treynolds' above example. They can be created and deleted on demand, and terrain generators exist. If you need a 'phase' system, you can generate more copies of the map elsewhere with different features. Bricks should also be systematically removed when they are beyond a player's view distance to keep the server from reaching the brick count, and regenerated when players enter range again.

How exactly would I start a solo server, and run that code? Console didn't work for me.
You'll have to put it all on one line if you want to use it in console. Otherwise, you could package it into an add-on as "server.cs" with a blank "description.txt" file in a folder and enable it in the custom gamemode settings.

You can create bricks client-sided but they won't have collision
You can? How?

You can? How?
You need to get the datablock, and then create a new fxdtsbrick and add it to serverconnection?

%cube = new fxDTSbrick() { datablock = brick4xCubeData; position = "0 0 0"; angleID = 0; colorID = 2; isPlanted = 1;}; %cube.setTrusted(1);  %cube.plant();  %cubee = new fxDTSbrick() { datablock = brick4xCubeData; position = "10 0 0"; angleID = 0; colorID = 2; isPlanted = 1;}; %cubee.setTrusted(1);  %cubee.plant();

doesnt generate two. it says eval error.

Stop doing everything through the console. When you cram everything into one line, it's impossible to tell what's going on.

Put it all in a text file with a *.cs extension, place that file in your "Blockland\base" folder or elsewhere, and then type exec("base/myFile.cs"); in console.

Thanks that's very useful.
Do you know how to something like
Table={"0 0 0", "20 0 0", "40 0 0"}

for i=1, #Table do

%cube = new fxDTSbrick()
   {
      datablock = brick4xCubeData;
      position = Table;
      angleID = 0;
      colorID = 2;
      isPlanted = 1;
   };
   %cube.setTrusted(1);
   %cube.plant();

end



Save all the positions in a table, so I don't have to write out the brick code for every single brick?