Author Topic: No-Moving Ghost Bricks Salvage  (Read 728 times)

In salvage, you can break, place, move, and undo bricks. But what I'd like is for you to not be able to move a ghost brick once you've placed it, or be able to undo brick placement.

No moving ghost bricks would be useful because it can stop things like being able to place bricks on the other side of a wall, which is crucial for my server. Being able to undo bricks could be abused with traps.

Modify this version instead of a normal one.

Code: [Select]
package blorpis
{
    function servercmdshiftbrick(%client, %x, %y, %z)
    {
        return;
    }

    function servercmdsupershiftbrick(%client, %x, %y, %z)
    {
        return;
    }

    function servercmdundobrick(%client)
    {
        return;
    }
};
activatepackage(blorpis);

Pop that into a server.cs and there is like a 50% chance it will do what you want

I think that servercmdsupershiftbrick actually just calls servercmdshiftbrick with modified values, but I might also be crazy so don't quote me on that.
« Last Edit: May 11, 2015, 01:27:42 AM by Nexus »

how does clicking a ghost brick down work?
is it it's own function, or does it tell the ghost brick to move there, calculations from the old on the client?

how does clicking a ghost brick down work?
is it it's own function, or does it tell the ghost brick to move there, calculations from the old on the client?

I think it's tied to the brick placer tool's ::onFire() function, but that shouldn't be necessary.

I don't really like this idea as brick placement isn't exactly perfect and will cause annoyment. "Click to place" works in Minecraft because blocks are huge and mostly one directional, but blockland has some tiny bricks, and most have 2, many have 4, directions they can face

If your goal is just to not allow players to plant bricks on the other side of a wall or other such obstacles, you could use a raycast to restrict players from planting bricks in locations they can't see
« Last Edit: May 11, 2015, 01:48:28 PM by Headcrab Zombie »

If your goal is just to not allow players to plant bricks on the other side of a wall or other such obstacles, you could use a raycast to restrict players from planting bricks in locations they can't see

Actually, that would be a much better idea. Wouldn't that cause lag, though? I could be totally wrong.

Actually, that would be a much better idea. Wouldn't that cause lag, though? I could be totally wrong.
I doubt it would be that bad, it's just one raycast, maybe 9 or 21 checks at most (corners and edges for better sight detection) per brick placement

It wouldn't cause any lag at all

Well, if anyone could make it, then please do :D