Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Block scripts requests thread

Discussion in 'Programming (In-game)' started by TehGM, Jan 1, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. krypt-lynx Apprentice Engineer

    Messages:
    175
    Not really, actually.

    That about walkers... You need to prite to Boston Dinamics. No, seriously :)
     
  2. halipatsui Senior Engineer

    Messages:
    1,253

    It depends on what you want it to do.
    I doubt level of "i download this to my mech and it starts jumping running and doing cartwheels is possible.

    My friend tried to do a mech script that would cycle between set of stances using wasd buttons. It did not work because rapid rotor refresment rate took away most of rotors power and made joints weak.

    But that script had its oen setup.
    It would be pretty hard to make a script know which subgrid is which part, how to use that part, how to determine right limits for their movement?

    I would say script like this for mechs in general, any size, bidy type etc is extremely hard if not impossible.


    There are however largee set of scripts that are extremely useful.

    Like easy automation
    Or gravity aligner

    I use those in most of my mechs
     
    • Agree Agree x 1
  3. nubeees Trainee Engineer

    Messages:
    83
    General idea I was thinking is you tell it what sorta setup its working with (how many joints and how they're arranged basically. There's lots of ways you can set up a mech, which is the difficult part.) Then using this input and names given to different rotors, determines how to move each joint, and when to do so.
    Even better if it can take user input from a flight seat!
     
  4. halipatsui Senior Engineer

    Messages:
    1,253

    How to tell the setup?
    Making a general know it all script would also be a bit overkill since you can make a walk cycle with ONE timer block :D
     
  5. nubeees Trainee Engineer

    Messages:
    83
    Seems no one has touched this thread for a while, so I suppose I'll toss out a request for anyone willing to take it up:
    Basic orbital info script:
    I'm pretty certain you can take the necessary data from remote control blocks. Using the craft's current velocity and direction, as well as planet parameters such as radius and gravity to calculate the height of the apoapsis and pariapsis of your trajectory, then displays it somewhere. (This assumes you're using a speed mod.)
    Default planet gravity falloff in Space Engineers is 7, but you can change a planet's gravity falloff in the sandbox file, so it would be nice to have falloff as a variable changeable in the code.
    I can probably track down the appropriate equations if necessary. :)
     
  6. Audiacious Trainee Engineer

    Messages:
    47
    What I would love to see is an alert script that works with radar to automatically trigger an alert, closing doors and hangars. Basically once something comes into broadcast range it triggers, and sends out a message to you that enemies are detected if you are out say mining or such.
     
  7. krypt-lynx Apprentice Engineer

    Messages:
    175
  8. halipatsui Senior Engineer

    Messages:
    1,253

    So this is improved EA?
     
  9. krypt-lynx Apprentice Engineer

    Messages:
    175
    No, it is my implementation of the same idea. Well, at moment of creation it was more reliable then EA, I believe. But it have less features.

    Probably the only exclusive feature of Sequencer is ability to run multiple scripts simultaneously.
     
    Last edited: Feb 1, 2018
  10. halipatsui Senior Engineer

    Messages:
    1,253
    Can it be used to trigger a timer block when a assigned turret detects something?
     
  11. krypt-lynx Apprentice Engineer

    Messages:
    175
    No, it have no automatic actions except game load, it must be directly started (by another script, timer, button, or whatever).
    At current moment it serves as replacement for bunch of timers +some extra methods available only in pb api (like transmit data or set text). It is easier to modify script then to reconfigure programmable block. This is, probably all.
    But I will add this in my idea list. I'm already planing some improvements, including event subscriptions. I hope, major update will eventually happen :D
     
  12. MajorXAcE Trainee Engineer

    Messages:
    1
    Anyone have a working script that can track/lead a target for gravity cannons?
     
  13. Neferdias Trainee Engineer

    Messages:
    2
    I have a bit of a long-winded request. I am working on a respawn ship and need a script to do a specific action when requirements are met. The vehicle is a land rover with a piggyback airdrop unit (with thrusters) attached via merge block on its back. The rover is equipped with a battery and solar panels, the backpack has no native power attached (this is by design for survival purposes, but I could add a small reactor for the program block if needed).

    The idea is when you spawn into the world, you will be able to fly around for a short period of time to find a suitable building location. This time is determined by the amount of battery left on the rover (which will power the backpack). What I want, is for a script to check the battery and when the battery hits 10% capacity the script will trigger, disabling the thrusters and forcing a free fall. Parachutes will be equipped to the backpack to break the fall. When the chutes are at deployment altitude, the script will detect that (or detect the deployed chute), it will wait 10 to 15 seconds, then disable the merge block holding the backpack to the rover. I will want to experiment with the time, as the rover will need to be close enough to the ground that it won't explode, but still be able to clear the now disabled backpack.

    I have a little bit of programming knowledge, so if anyone is will to help me out with this request, adding comments for where to edit the wait times/reference block names/IDs is helpful.
     
  14. Roxette Senior Engineer

    Messages:
    1,546
    While this may seem like a nice idea in theory, I suspect that more than half the time the thing will be too low for the chute to deploy in time to prevent a hard impact, and you'll just end up with a lot of voxel damage and surface wreckage to deal with :D
     
  15. posthy Apprentice Engineer

    Messages:
    122
    I'm not sure if this is possible with SE currently, but here's the idea: I'd like to have a script that makes weapons gimballed. This means if you put weapon(s) on some sort of rotor structure, then the script will aim the weapon for you, positioning the red dot in the middle of your crosshair, regardless of how off-center your weapon is.
     
  16. Namdoolb Apprentice Engineer

    Messages:
    245
    This is probably a really simple script (relatively speaking), but I am no programmer, so here goes:

    I was wanting to build a carpet bomber; fly over an area and drop a bunch of bombs in sequence.
    Each bomb was going to consist of a rotor head, warhead, sensor, parachute block, and at least one timer block. Anything else on the bomb *should* be either structural or otherwise not relevant to the script.

    The plan was to have the script check the grid for the lowest numbered rotor with a connected subgrid; (I am fine with prefixing the name of the rotor & subgrid if necessary)
    turn on all the blocks in that subgrid(except for the sensor - I'd like to turn that on via timer block so I can have a short delay), start a specified timer block on that subgrid, and then disconnect the rotor.
    Then it wants to wait for approximately one second (I am fine with starting a timer countdown on the main grid to achieve this if it's easier), then repeat the process.
    If it finds no rotors with a connected subgrid, then the program ends.
     
  17. EMEUTIER Trainee Engineer

    Messages:
    1
    Hey all, does anyone have, or know of a PB script that can calculate if my ship will be able to take-off and land on planets?
     
  18. chris crank Trainee Engineer

    Messages:
    1
    does anyone know of a script that will auto craft components like automated assemblers v1.0?
     
Thread Status:
This last post in this thread was made more than 31 days old.