Space Engineers

Space Engineers

603 个评价
LAMP | Launch A Missile Program (for WHAM)
6
4
2
   
奖励
收藏
已收藏
取消收藏
标签: other_script
文件大小
发表于
更新日期
401.714 KB
2020 年 5 月 25 日 上午 9:17
5 月 3 日 下午 10:07
33 项改动说明 ( 查看 )

订阅以下载
LAMP | Launch A Missile Program (for WHAM)

在 Whiplash141 的 1 个合集中
Whip's Scripts
22 件物品
描述
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.)
热门讨论 查看全部(1)
338
8 月 29 日 下午 7:31
置顶: Help/Questions (LAMP)
Whiplash141
649 条留言
V0IDBEANS 9 月 25 日 上午 10:35 
Of course! https://steamproxy.net/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  [作者] 9 月 25 日 上午 6:56 
Huh... that sounds like a strange game bug. Do you have a blueprint where I can replicate that behavior?
V0IDBEANS 9 月 25 日 上午 12:50 
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  [作者] 9 月 24 日 下午 9:31 
Deselected in what sense? I'm not sure I'm following what the issue is.
V0IDBEANS 9 月 24 日 下午 7:17 
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  [作者] 9 月 12 日 上午 2:17 
@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 9 月 11 日 下午 4:55 
Hi, is it possible to shoot missiles with beam and once they are within 5k you switch them to Camera Lock?
A_Superior_DuDe 9 月 6 日 下午 2:54 
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  [作者] 8 月 13 日 下午 5:56 
No, but you can do something with event controllers to that effect
boo7716 8 月 12 日 下午 2:17 
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.