Space Engineers

Space Engineers

623 ratings
LAMP | Launch A Missile Program (for WHAM)
2
7
4
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
401.714 KB
May 25, 2020 @ 9:17am
May 3, 2024 @ 10:07pm
33 Change Notes ( view )

Subscribe to download
LAMP | Launch A Missile Program (for WHAM)

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
LAMP | Launch A Missile Program
"I love LAMP." - Satisfied user


  Description
LAMP is a fire control program for my homing missile script, WHAM. It allows you to fire guided Player Made Weapons (PMWs) at targets. You may be asking: "Why is it called LAMP?". Well much like a lamp, this script illuminates a target for its missiles! (*Groan*)

This script also communicates with WHAM missiles using the Inter-Grid Communications API (IGC) instead of exploits. Because of this, missiles can be sent commands mid-flight to change their behavior.

If missiles have stealth disabled, they will also show up on screens using my Turret Based Radar script. Additionally, any target that you are actively painting with camera raycast will also show up on friendly radar!

LAMP is capable of 3 guidance designation modes:
  • Camera Homing - Uses camera raycast for target tracking (colloquially referred to as LIDAR)
  • Turret Homing - Uses targeting data from AI turrets and custom turret controllers
  • Beam Riding - Missile follows your look direction much like a TOW missile

Note: This script supports camera raycast designation to a max range of 5km. Turret designation range is only limited by the max range of the grouped turret(s) themselves.

Homing Functionality
When in either of the homing designation modes, you must have a target lock before firing. If the missiles you are firing are setup with cameras, the missiles will attempt to lock on to the target themselves (Active Homing). This means that you can fire and forget them as they will track on their own.

If the missiles do not have any cameras on them, they will only fly towards a target that you are currently painting (Semi-Active Homing). See the WHAM script for more details about setting up missiles with cameras (it is real simple, I promise!).

Example ships:


  Instructions
See the full guide for instructions.




  Author's Notes
This has been in development for quite some time now, so I hope it is nice and polished. If you notice any issues/bugs, please let me know.

Also, I've minified this code to make it fit in the programmable block. I have not obfuscated any of the code; only the white-space has been blasted. You can use an IDE like Visual Studio to auto-format and beautify the code into something that is less dense.

Also huge thanks to my testers! (Out of characters, list on guide)

Enjoy!

(Also, this should also go without saying, but do not reupload without explicit permission from me, not even to mod.io.)
Popular Discussions View All (2)
353
Mar 30 @ 2:33pm
PINNED: Help/Questions (LAMP)
Whiplash141
1
Jan 16 @ 2:32am
Missile range
Hasbick
675 Comments
Whiplash141  [author] Apr 1 @ 10:07pm 
"What's the mechanism by which LAMP determines a target lock?"

Camera raycast. Point directly at the target while looking through your camera and it will acquire and lock the target. If LAMP does not say that you have a target lock, then you do not have a target lock.

You can start your world in single player, hit F11, and enable debug draw to see where your camera raycasts are going.
Baby Jesus Apr 1 @ 7:24pm 
I'm having an issue where I target lock a ship, but LAMP is not saying that I have a target locked for the purposes of Camera based fire control. What's the mechanism by which LAMP determines a target lock?
Whiplash141  [author] Mar 16 @ 8:09pm 
There are 2 commands, enable_fire and disable_fire, which should do what your are looking for
Based_Stickman Mar 16 @ 5:13pm 
Is it possible to get a master Arm command so that it wont fire anything if not armed so that i can have a lock and use event controller to set when i can fire a missile?
Whiplash141  [author] Feb 27 @ 12:05am 
In the custom data of the WHAM programmable block, there is a section for the gyro PID params that you can mess with
prexray13 Feb 26 @ 7:23am 
how do i do that ?
Whiplash141  [author] Feb 17 @ 8:40am 
That's likely the cause. You may need to tune the gyro PID as a result so that the rotational control is tighter
prexray13 Feb 17 @ 6:19am 
yes it has modded thrusters and gyro
Whiplash141  [author] Feb 14 @ 7:58am 
Any mods?
prexray13 Feb 14 @ 7:40am 
my missiles overshoot the target and come back to hit from the other side it ussualy hapens when the target is on the same altitude as the rocket firing position is there anything i can do to fix this ?