Space Engineers

Space Engineers

LAMP | Launch A Missile Program (for WHAM)
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 ?
Baum Jan 16 @ 2:30am 
Hey, can you add a function like a rada like LiDAR mapping script to attack multiple targets simultaneously and at long range ?
Whiplash141  [author] Jan 5 @ 8:49pm 
No it does not. LAMP solely operates on block groups.
Duke3D Jan 5 @ 8:07pm 
this script change all your block names
Xavius Dec 22, 2024 @ 5:10pm 
I love LAMP & WHAM !

Very nice, i would consider myself a satisfied user!
btw. the guide is awesome and nicely formated


Thanks for making Whiplash141 :steamthumbsup:
V0IDBEANS Dec 11, 2024 @ 11:28pm 
Wiplash141 just saw you responded to my comment, thank you so much for getting to that. Love your mod Thank you!
Kev Nov 23, 2024 @ 10:45pm 
Thanks whip! Once again whip is a legend in the space engineers community.
Whiplash141  [author] Nov 23, 2024 @ 9:44pm 
"Is this "Satisfied user" in the description, a moth, perchance?"
Mayhaps lol

"btw is there an example missile out there?"
An example launch platform with missiles is available: https://steamcommunity.com/sharedfiles/filedetails/?id=3207356939

Feel free to disassemble, pillage, and customize :)
Kev Nov 23, 2024 @ 8:22pm 
btw is there an example missile out there?
Kev Nov 23, 2024 @ 8:20pm 
Is this "Satisfied user" in the description, a moth, perchance?
Whiplash141  [author] Nov 9, 2024 @ 3:32pm 
No, sorry
Lt.Fenix Nov 9, 2024 @ 1:39pm 
Is there any chance you'd consider adding long-range sensors for target locking?
Whiplash141  [author] Oct 24, 2024 @ 8:44am 
You should see blue FOV pyramids and orange lines that denote where the raycasts are going like shown in this video: https://www.youtube.com/watch?v=_4jcQjZVkno

The orange circles indicate where the raycast impacted something. Those small orange sphere should be appearing on the surface of the ship you are targeting. If they are showing up on your ship instead, they are being obstructed.
Big Cat Oct 24, 2024 @ 12:16am 
Toggling physics primitives worked, not sure how to tell if my cameras are obstructed though. A bog green box is around the grid I'm locked onto, and a sphere is above my ship, which seems to be the source of the camera raycast if I'm correct.
Whiplash141  [author] Oct 23, 2024 @ 9:01am 
Interesting, it works consistently for me. Try toggling physics primitives on then back off then enable debug draw.

Alternatively, you can leave a link to your ship and i can diagnose the issue you are having quickly.
Big Cat Oct 23, 2024 @ 7:34am 
I’m not seeing any raycasts at all I’m when I turn the option on. Seems like others have had this issue with the F11 menu since the Automaton update
Whiplash141  [author] Oct 22, 2024 @ 9:52pm 
@V0IDBEANS:

This is a "fun" quirk of how merge blocks work. When you unmerge two grids, you are essentially deleting the blocks of the smaller grid and respawning them in place as their own grid.

The custom turret controller identifies blocks by their entity ID, when the smaller grid (your camera subgrid) is respawned in this manner, the entity ID changes and thus the camera linkage breaks. The fix is to just add more blocks to that camera subgrid. I added like 50 blocks in a stupid pole and launched the missiles and the missiles were the grid that got remapped/respawned.

The other solution is to move the camera off of the grid that unmerges from the missiles.
(I haven't seen this game quirk in like 5+ years and I forgot it was a thing haha)
Whiplash141  [author] Oct 22, 2024 @ 9:36pm 
Jump in single player, load up your ship, hit f11, and enable debug draw. It will show you precisely where the camera raycasts are going. I suspect that your cameras are obstructed.
Big Cat Oct 22, 2024 @ 9:13pm 
So I've been playing around with this and WHAM a lot, and the camera locking and homing on a ship that's around 1KM away reads as "No Target" I can only use the Beam Ride homing option, which is difficult for a small grid ship
V0IDBEANS Sep 25, 2024 @ 10:35am 
Of course! https://steamcommunity.com/sharedfiles/filedetails/?id=3337469601 on the menu (ctrl + 2) + (4) is where the turret is located (ctrl +3) is where the Lamp controls are located. 1 = fire, 2 = switch mode, 3 = lock on. "ATGM Custom Turret Controller" is the turret where the camera keeps switching to none when I fire the last missile so I can't see while I beam ride. I appreciate your help a lot!
Whiplash141  [author] Sep 25, 2024 @ 6:56am 
Huh... that sounds like a strange game bug. Do you have a blueprint where I can replicate that behavior?
V0IDBEANS Sep 25, 2024 @ 12:50am 
The custom turret controller I use to launch the missile is assigned to a camera. when I fire the last missile the assigned camera on my custom turret controller will switch to none. and then I have to re assign the camera on the custom turret controller. and sense I cant see the through the camera, I cant guide my missile. sorry if Im not making any sense.
Whiplash141  [author] Sep 24, 2024 @ 9:31pm 
Deselected in what sense? I'm not sure I'm following what the issue is.
V0IDBEANS Sep 24, 2024 @ 7:17pm 
Hi Whiplash I wanna thank you for making my favorite script, but I am running into an issue where when I shoot my last missile my camera gets de selected from my custom turret that I use to shoot the missile which means I can use the beam ride! I have to go back to the custom turret controller to select the camera again. I have recompiled all the code and I have replaced all the custom turret parts and It still de selects the camera in my custom turret controller and I am very confused... I also notice the lcd panel flickers and I shoot my last missile... very strange! if you could let me know what it could possibly be that what be much help to me. and again thank you for your work!
Whiplash141  [author] Sep 12, 2024 @ 2:17am 
@A_Superior_DuDe: No

@inno16: You have to manually designate the target for camera homing to establish lock. You *can* initially fire in beam ride, then switch to camera homing mid flight, but the missiles can't automagically just detect targets on their own.
inno16 Sep 11, 2024 @ 4:55pm 
Hi, is it possible to shoot missiles with beam and once they are within 5k you switch them to Camera Lock?
A_Superior_DuDe Sep 6, 2024 @ 2:54pm 
Hey, i have been tinkering with your code, and added WC Turret compatability for my own use. (Want to engage targets at 10+km).

I have gotten it to function, however upon successful hit, the program crash and needs to be Recompiled.

EXCEPTION:
System.InvalidOperationException: Nullable object
must have a value.

at
System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource
resource)

at Program.BroadcastTargetingData()
at Program.GuidanceProcess()

The only change to the code is that i use the WC api to populate the _targetinfolist with a MyDetectedEntityInfo when it has a target. (And yes, im verifying that the target variable isnt null before passing it :P

Have been troubleshooting a bunch, but i only have like 5 characters left after i minified the code, so im a bit short on space (and ideas)


Do you have any idea what could cause this issue?
Whiplash141  [author] Aug 13, 2024 @ 5:56pm 
No, but you can do something with event controllers to that effect
MEGATRON Aug 12, 2024 @ 2:17pm 
Can you make an update wich detects ship speed and rotation and prevents LAMP from firing (or autofiring). This will be verry helpfull to prevent accidents.
sharkiemalarkey7 Jul 16, 2024 @ 10:39am 
Love the acronym "LAMP", it reminds me of a funny video where a IR missile is facing the sun. (If you want to see what I mean, here is the link to the video, https://www.youtube.com/watch?v=On9iCg_VyZM)
Whiplash141  [author] Jul 16, 2024 @ 10:15am 
no
Sunflower Jul 16, 2024 @ 4:25am 
Is there any possibility of aiming missiles in the "Turret" mode using turrets from the WC?
Whiplash141  [author] May 19, 2024 @ 4:02pm 
No. You can currently set up timers to be triggered on lock, on search, on idle, and on missile fire. You can do any arbitrary logic you want in there.
Based_Stickman May 19, 2024 @ 1:49pm 
Will we get the ability to have the broadcast controller be apart of a launching ships fire control so we can send messages if lock lost, missile fired, etc....
Whiplash141  [author] May 12, 2024 @ 8:01am 
Nope, there is not currently.
[ZD] Jobey May 12, 2024 @ 5:22am 
Is there a way for you to have different targets marked at the same time for the autofire? I am being attacked by waves of small drones and was hoping to fire a missile at each at the same time once they are in range?
Come and See May 9, 2024 @ 4:11pm 
I solved my own problem by modifying LAMP to work off of WeaponCore turrets. :D I just added the WC API stuff and updated TurretGuidance. This is for my singleplayer shenanigans because I wanted to make a mobile AI SAM platform and missile firing drones.
Whiplash141  [author] May 7, 2024 @ 3:39am 
That won't work. Camera raycast is very unlikely to blindly search and find things.
Come and See May 6, 2024 @ 8:57pm 
So I wanted to make attack drones that would automatically fire their missiles once they have a target. I'm using weaponcore so turret lock is out of the picture. I'm guessing the best way would be via camera lock with a timer block that runs lock_on until a target is found and it initiates auto fire?
Whiplash141  [author] Apr 25, 2024 @ 2:22pm 
The AI blocks have dogshit guidance, so no I'm not at all concerned.
mhwyoshi Apr 25, 2024 @ 2:15pm 
Are you concerned that this script is made obsolete due to the new AI blocks? How are you going to make it relivent? Are you going to find a way to make it have the option for autohomming?