Space Engineers

Space Engineers

183 ratings
Easy Radar Homing Script (Decommisioned)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
13.643 KB
21 May, 2016 @ 11:33am
22 Nov, 2016 @ 5:27am
67 Change Notes ( view )

Subscribe to download
Easy Radar Homing Script (Decommisioned)

Description
GetFreeDestination is officially removed from game, therefore this item is now only a relic of the past.

NEW! Checkout my new replacement script, the Camera Raycast Lock-On Script:
http://steamproxy.net/sharedfiles/filedetails/?id=807454034


This is a Vanilla Script. No Mods are required.



Important Notes





See video first on how to setup this script.

Best used together with the Launch Control Script to launch multiple missiles:
http://steamproxy.net/sharedfiles/filedetails/?id=691441036

And also with Missile Status Script to get missile lock-on information:
http://steamproxy.net/sharedfiles/filedetails/?id=702255497



Features

1) Script features 7 Types of Homing Modes (See Homing Modes section).
2) Missile Layout Auto Detection - Build your missile in any orientation and configuration. Script will auto detect the missile layout.
3) Lead Target Function - The missile will try to lead the target.
4) Drift Function - Missile can drift to compensate for lack of side thrusters.
5) Natural Gravity Dampener - Your missile may only have thrusters on one side. This function will face that side to the gravity as dampener.
6) Missile Deployment Actions - You can configure a set of actions to execute when missile is a certain distance from target. See Missile Deployment Commands Section.



Homing Modes

[Mode 0] Active Radar Homing
Fire and Forget homing mode, using GetFreeDestination function. The ship will do the initial lock-on by pointing at the target. Once lock-on is stabilized, missile switches to full on-board homing.

[Mode 1] Active Radar Homing (GPS Initiated)
Same as the above homing #1, except it uses a GPS Coordinates from Text Panel instead of pointing at target.

[Mode 2] Semi-Active Radar Homing
Similar to method #1, except that the lock-on beam is traced from the launching ship to target instead of from missile to target.

[Mode 3] Camera Or Turret TV Guided
Use the ship's Camera or Turret to TV guide the missile.

[Mode 4] GPS Cruise
Homes in on the GPS Coordinates set by the Text Panel.

[Mode 5] Active Radar Homing (Camera Initiated)
Fire and Forget homing mode. The ship's Camera or Turret will do the initial guidance and lock-on by aiming at the target.

[Mode 6] Active Radar Homing (Initial Camera Or Turret TV Guided With Lock-On)
Fire and Forget homing mode. The ship's Camera or Turret will TV guide the missile until a lock-on is achieved via the Remote Control. Remote Control should be close to the Camera or Turret to prevent parallax error.



Required Setup

Setup is extremely simplified. Script automatically detects everything, from which direction is the missile facing, to whether drift is required.
Just build your missile anyway you want it, following a few rules listed below:

For Missile

1) A Programmable Block loaded with this script.
2) A Timer Block to loop this script. Timer block calls "TriggerNow" of itself for looping and calls Programmable Block Action "Run with default Argument".
3) At least one Remote Control.
4) At least one Gyroscope.
5) At least one Thruster.
6) Exactly one Merge Block for detaching missile from ship.
7) At least one Power Source.

- Make sure there is enough thrust to fly your missile. Put some thrusters for dampening missile when it is travelling horizontal to gravity.

- (Optional) A Sensor Block named R_SENSOR. When the sensor detects a target, it will ignore all current modes and chase that target instead.

- (Optional) A Sound Block named R_ALERT on your launching ship. This block will be played when the missile is locked.

For Launching Ship

For Homing Modes 0 and 2

A Remote Control named R_REMOTE. Ensure this block faces forward in the same direction as where you intend to aim your ship at the target.

For Homing Modes 1 and 4

A Text Panel named R_TARGET. This Text Panel contains GPS coordinates from any other sources.

For Homing Mode 3 and 5

A Camera or Turret named R_CAMERA. This Camera or Turret is used for guiding the missile (Can also be a Cockpit or any front facing block).

For Homing Mode 6

A Camera or Turret named R_CAMERA. This Camera or Turret is used for guiding the missile (Can also be a Cockpit or any front facing block).
A Remote Control named R_REMOTE. If your R_CAMERA is a Turret, place this R_REMOTE as close to it as possible. Else ensure that it is facing the same direction as the R_CAMERA.

If P_WFT (waitForHomingTrigger) -OR- P_EMC (enableMissileCommand) Is Activated

A Text Panel named R_TARGET is required on top of the above (For Homing Modes 1 and 4, no additional Text Panel required. You only need one R_TARGET).

(Optional) Not Missile Marker

Name a block on your main launching ship as NOT_MISSILE (must be all caps), to prevent it from locking on to your ship and also prevent turning your ship into a missile due to detach failure.



How To Use

For Homing Modes 0 and 2

1) Trigger Timer Block of the missile to start the script.
2) Aim ship nose at target until missile responds and start homing to target.

For Homing Modes 1 and 4

1) Ensure Text Panel is populated with a GPS coordinate. This can be from any source such as another GFD lock-on scripts, Radar Mods and other target aquisition methods.
2) Trigger Timer Block of the missile to start the script.

For Homing Mode 3

1) Trigger Timer Block of the missile to start the script.
2) Keep camera or turret aimed at target until missile impacts.

For Homing Modes 5 and 6

1) Trigger Timer Block of the missile to start the script.
2) Aim camera or turret at target until missile no longer follows your aim, indicating that it has locked on to the target.

If P_WFT (waitForHomingTrigger) Is Activated

1) Trigger Timer Block of the missile to start the script.
2) Missiles will just fly straight and do nothing else.
3) When you are ready to start the homing (Any of the above Homing Modes), write the word "LOCK" to Public or Private Title of the R_TARGET Text Panel.
4) Proceed with the above procedures for each of the Homing Modes.



GFD Call Reduction

By default all GFD related homing will call the GFD algorithm every tick (60 times per second). You can reduce this by setting GFD_LOCK_ON_INTERVAL to the number of ticks for each algorithm call.
Example, setting 15 means the script will try use GFD calls every 15 ticks (4Hz).

This is only applicable when script is in full homing stage (Fired and Forgotten). Initial lock-on will still use GFD algorithm every tick.



Missile Deployment Commands

See discussion for the list of available commands.



In-Flight Missile Command

See discussion for the available parameters.



Dynamic Configuration

You can set the Argument of the Programmable Block to a specific command string to dynamically change missile behavior during launch.

See discussion for the available parameters.



Possible Issues And Solutions

See discussion for the available parameters.
Popular Discussions View All (5)
14
22 Oct, 2016 @ 2:14am
PINNED: Possible Issues And Solutions
Alysius
4
4 Jun, 2016 @ 9:02am
IMyLandingGear.GetAttachedEntity()
Lynnuxx
3
24 Nov, 2016 @ 12:32pm
PINNED: Missile Deployment Commands
Alysius
451 Comments
MrFox 26 Jun @ 6:52am 
SO edit this listing for this and hit "hide" or delete.
Foundation 26 Mar, 2019 @ 3:09am 
can you recommend other good scripts for this ?
Alysius  [author] 29 Jun, 2017 @ 11:04pm 
Nope, the GetFreeDestination method that is thr basis of this script is already removed from in game script access for quite some time now.
Floppa 29 Jun, 2017 @ 10:35pm 
does this script still work?
Alysius  [author] 1 Dec, 2016 @ 3:51am 
@William Sorry accidentally clicked delete while replying. The GFD method used by this script is removed in DEV. ita only a matter of time before it is propagated to Stable. So this script is about to be retired.
Alysius  [author] 25 Nov, 2016 @ 5:03am 
Going to release the camera lock on script soon, but there will be not much tutorials. No urgency at all, probably will release in 3 months time.
Alysius  [author] 25 Nov, 2016 @ 5:01am 
@Shala Camera and cruise mode still works after some tweaks.
TATAKAE 21 Nov, 2016 @ 1:40pm 
So, are the "laser Guided Missiles" still working?
Lynnuxx 21 Nov, 2016 @ 1:36pm 
Great work, Alysius. RIP, GetFreeDestination() (in in-game scripts) !
SKEED ETO 21 Nov, 2016 @ 11:29am 
i would much appreciate that i really love ur script and would be a shame if it be lost for this time