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.

Making ballistic missile behave like..a missile?

Discussion in 'General' started by Johnnyjohnny, Sep 13, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Johnnyjohnny Trainee Engineer

    Messages:
    4
    First of all, sorry if this is some repost of anything, I tried using the search function but it throwed me some wierd errors.
    This may not be the appropriate forum, but I didn't want to clutter the tutorial section if I can't contribute with an actual tutorial.

    However, I have an issue that im a bit puzzled about. I made more or less a fairly big ICBM, which consist of the remote control block and couple of timer blocks + the warheads. It flies perfectly out of it's silo and up in the air as intended and once up in the air a few seconds later it activates the autopilot and guides itself towards it's GPS coordinates in "one way" mode. So far so good. However what's making this a bit weird is because it's acting like a ship (well which it is to be fair), and more or less tries to land at the coordinates, rather than slamming into the coordinates or just reach it "at any cost".

    Is there any way to force the autopilot to just go straight for it and not even attempt to level up and "land"? In my test we put the coordinates on a ship and it kinda tries to land on the deck and eventually slams into the ship.

    So back to the question, can the autopilot be adjusted, or do I need to use a programmable block? (if someone has a simple code without anything fancy, please share)
     
  2. Malware Master Engineer

    Messages:
    9,631
    The autopilot is rather rudimentary, and it's designed for ships not weapons. You're gonna have to use a script, yes.
     
    • Agree Agree x 1
  3. ShadedMJ Apprentice Engineer

    Messages:
    220
    You might start a timer block during launch to last until fully aimed and by that time at full speed. Timer block would turn off the autopilot. It would go at full speed toward target and not stop.
     
  4. Johnnyjohnny Trainee Engineer

    Messages:
    4
    Thanks for the replies guys. While trying to find some suitable script that suits my needs i'm gonna try your suggestion a bit ShadedMJ. Bit hard to calculate though when it's aimed correctly or not, but I guess with some trial and error it can work :D
     
  5. ShadedMJ Apprentice Engineer

    Messages:
    220
    For a script, I thought of a fairly simple one, but requires math which may not be your preference.

    Script runs once per second although that frequency can be changed. Detect your ICBM travel speed and it compare it with the last speed seen by script. Speed should increase on the way to target, but if it remains consistent for a bit then you are at max speed to target, then shut off the remote control.
     
  6. halipatsui Senior Engineer

    Messages:
    1,253
    You could also have a sensor that detects if the target is in front of the missileand turns autopilot off and overrides thrusters
     
    • Like Like x 1
  7. Ronin1973 Master Engineer

    Messages:
    4,830
    You can use the autopilot, but it's going to take a bit of scripting. You have your launch point and then your target point. You want to override thrusters on the ICBM and launch your missile straight up until it reaches a specific cruise altitude. This should be near the ceiling height to avoid terrain. You then want to program in a series of navigation points between the missile and the target. Once the missile is over the target, you want to turn the missile so it heads straight down to the target.

    This can be done by knowing the planet's center coordinate, which can be gathered through scripting from the remote block. Just before launch, you want to draw a line between the planet center through the remote block of the ICBM to the ceiling height. You also want to draw a line from the planet center, through the target to the ceiling height. A third line should be drawn between the ceiling height over the missile and the ceiling height over the target. Next up, you want to divide this line into equally spaced segments around 10,000 meters or so. Now draw lines from the planet center through each of these 10k spaced line segments to the ceiling height. (that's a bit of calculating)

    Now you have a flight path for your missile's remote block. Once it reaches the final point over the target, you'll have to decide what to do. If your ICBM is capable of braking with reverse thrusters, it can slow down and basically stop at the final point. From there, you can just cut the power to the reverse thrusters and align the ICBM to the gravity vector so that the missile is facing down and heading for the target.

    -OR-
    You could just use Alysium's ballistic missile script.
    https://steamcommunity.com/sharedfiles/filedetails/?id=716437919
     
  8. May Rears Apprentice Engineer

    Messages:
    414
    You could always turn it into a cruise missile by using a remote control, camera and antenna. A small block missile would be controllable out to 5km (the range of the antenna) or a large block one 50km. You can use the autopilot to get you to the right area and pointing at the target then shut the autopilot off for the terminal dive. If you can make the terminal dive as vertical as you can even if defenses hit the missile debris will still hit the target area.
     
  9. halipatsui Senior Engineer

    Messages:
    1,253
    Thanks for the script link ronin!
    I have been looking for a ballistic missile script literally a year.
    I wanted to give metal gear vlang ballistic missile but eventually had to go with whips optic script.
    Maybe i can now start working on better nukes :3
     
  10. Ronin1973 Master Engineer

    Messages:
    4,830

    I've been hacking a lot of Whip's stuff for my own use. But it's unpublished work since it's Whip's scripts. I've not messed with Alysium's script yet so I can't vouch for it. But it's very popular so I assume that it works. Alysium's script is also capable of triggering events along its flight path. So you could build in custom features without knowing a lot about C# scripting. If you're handy with C#, you can do things like auto input GPS coordinates using a camera's raycasting ability.
     
  11. Pennywise Apprentice Engineer

    Messages:
    338
    For ballistic missiles you need to change gravity settings and speed limit.
     
  12. halipatsui Senior Engineer

    Messages:
    1,253
    Not really if you are on 20 km moons
     
  13. halipatsui Senior Engineer

    Messages:
    1,253
    Damn that ballistic missile script is sweet. Im loving it.

    Now i can create metal gears with actual icbm's :3
     
Thread Status:
This last post in this thread was made more than 31 days old.