Moving Blocks

    Joined
    Aug 21, 2013
    Messages
    237
    Reaction score
    76
    • Legacy Citizen 2
    • Purchased!
    • Community Content - Bronze 1
    Add to the logic system 2 blocks to get moving parts. Watch gates close and elevators move, make factory machines look alive, and build ships with with hidden weapons or compartments.

    First a new type of ship core for building a piece of a space station or ship (such as a hangar door that will slide open or shut). These items may not give off ship IDs so they don't clog up the HUD, but they need to be mobile so they can move to their dock's location. I will call these Mounts.

    Second, add a rail block. These function something like the plex lifter. They detect similar blocks on either side of their location to form a chain that operates in one direction at a time. These also act like a dock, but only for vessels built with a Mount Core. I'll call this the Rail.

    So if we place the Mount on the Rail, then activate the rail with a logic block the Mount moves along the rail's length until it reaches the opposite end or an obstruction. Now we can extend wings, slide pieces of hull around as a ship enters 'battle phase' or have a dock slide into port to catch a ship, then slide back to the side to make room for the next vessel.

    ---
    Coding this could be done by performing one raycast for each column along side in the direction of movement. Each ray is as long as the height of the object/docking area. If anything is detected in those raycasts, movement halts and the Mount's dock is informed of which direction it should move when activated again.

    Power usage per block moved times the size of the docking area or docked vessel.
     
    Joined
    Jun 19, 2014
    Messages
    1,756
    Reaction score
    162
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen
    Plex doors are a bit boring if I may be honest, so things like sliders, pistons, rotors, lifters (things get lifted up, really handy for lifts) should really be in the game, and you shouldn't have to make seperate ships to do it.
     
    Joined
    Aug 21, 2013
    Messages
    237
    Reaction score
    76
    • Legacy Citizen 2
    • Purchased!
    • Community Content - Bronze 1
    @Megacrafter127 , that's exactly what I had in mind. I read through @Crusade 's instructions on making it and it's limited (though I'm still going to us it). You have to modify the game's config file, and can't put these types of contraptions on mobile ships (probably because they warp to get out of collision locks).

    Hat's off to @Crusade for managing that with the current system, though. It's a proof of concept, and I can't imagine it would take much to make this work in a more stable way. That's one reason I suggested the mount/rail idea, to make the pathway predictable when the parent ship is flying.

    ---
    The path of movement is a vector between the current position and position+1, where position+1 is the location above the next rail block in the chain and the check occurs every time physics are calculated.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    And make the moving structure "activate" blocking blocks at the end of the rail. Then you can place activation logic blocks at the logical end of the movement, and so when the moving structure hits the activation block, it stops and something else can happen. (E.g. Reverse the movement by reactivating the rail, start another part moving, such as extending a cannon array after the hull cover has moved to the side, turn on lights, etc.)