Author Topic: New floor object name?  (Read 1159 times)

Apparently if you lower the ground plane you can't build on it because you get a buried error.

Since no one directly answered his question, I guess I will.

Code: [Select]
function getGroundPlane(%offset)
{
%ray = containerRayCast(vectorAdd("0 0 1", %offset), vectorAdd("0 0 -1"), $TypeMasks::TerrainObjectType);
%obj = getWord(%ray, 0);
if(isObject(%obj))
return %obj;
error("No ground plane found! Using box search.");
%box = initContainerBoxSearch(vectorAdd("0 0 0", %offset), "0 0 1", $TypeMasks::TerrainObjectType);
%obj = containerSearchNext();
if(isObject(%obj))
return %obj;
error("No ground plane found! I don't know why. You forgeted something up I guess.");
return 0;
}

I added a box search backup because in my experience direct raycasts can be fussy, but are preferred to box searches. You could cut out the top half if you wanted.
« Last Edit: August 18, 2012, 09:49:02 AM by TripNick »

Since no one directly answered his question, I guess I will.

"New floor object name?"

He asked what the name of the ground plane is, which has been answered several times.

"New floor object name?"

He asked what the name of the ground plane is, which has been answered several times.
Just a quick question: how do I get the ID/properties of the new, presumably scripted, map floor? Did it even change at all?
He asked how you get the ID of a map floor, I assume he means after a gamemode change or server restart. He also said it's "presumably scripted" which means it probably wouldn't carry the name GroundPlane.
« Last Edit: August 18, 2012, 09:49:24 AM by TripNick »

which means it probably wouldn't carry the name GroundPlane.

But it does though.

But it does though.
Not if it's created through script, unless you specifically named it that. Like I just said, he said it's "presumably scripted".


GroundPlane.delete();

Not if the map stayed the same...
You add one client sided GUI script and start a server in-game and the ID will be different.
You change the game mode and the ID will be different.
etc.

Not if it's created through script, unless you specifically named it that. Like I just said, he said it's "presumably scripted".
There is literally no need to create one through script because there's still the part where a lot of stuff is hardcoded to the 0 Z level.

There is literally no need to create one through script because there's still the part where a lot of stuff is hardcoded to the 0 Z level.
Is there no way to go around this? I really need the ground plane below 0 Z for my Bedroom build.

Is there no way to go around this? I really need the ground plane below 0 Z for my Bedroom build.
Shift all the bricks in your save up the proper amount

Shift all the bricks in your save up the proper amount
Not my save. Every single other save that comes with Blockland. Can you shift all the bricks at once? A neat little script to do it?

Not my save. Every single other save that comes with Blockland. Can you shift all the bricks at once? A neat little script to do it?
It wouldn't be too difficult to write one

I'm pretty sure all you need to do is package calcsaveoffset or whatever that function's called.

I'm pretty sure all you need to do is package calcsaveoffset or whatever that function's called.
Didn't know there was a function like that, lol. I was thinking he could just do some file i/o and modify an existing save file.