Space Engineers

Space Engineers

Easy Radar Homing Script (Decommisioned)
 This topic has been pinned, so it's probably important
Alysius  [developer] 28 May, 2016 @ 11:24pm
Possible Issues And Solutions
Possible Issues And Solutions

1) Script uses the side with highest total thrust power as reference to determine which direction the missile is facing. What if you have more than 1 side having highest total thrust power?

Script will use the side in line with the longest missile length.

2) Your missile is exotic shape (e.g. Cube, Spherical), causing script to detect the wrong missile direction.

Set "strDirectionRefBlock" variable to the name of the block that is facing same direction as where the missile should face, and the downside is facing same direction as the dampeners (for planets, to counter gravity). Usually Remote Control is used as it is easier to see the forward and downside.

3) Your missile connected via Rotor or Connector, which is not the Merge Block supported by default settings.

Set "missileDetachPortType" to "1" for Rotors, and to "2" for Connectors.

4) Script detects that drift function should be used, but you do not want that.

Set "boolDrift" variable to "false" to override auto detection. You can also set to "true" to force drift.

5) Script detects that natural gravity dampening function should be used, but you do not want that.

Set "boolNaturalDampener" variable to "false" to override auto detection. You can also set to "true" to force natural gravity dampening function.

6) By default, script will try to lead target, but you do not want target leading feature.

Set "boolLeadTarget" variable to "false".

7) You want the missile to launch forward and idle for a set amount of time before turning, to clear the launch tube.

Set "launchSeconds" variable to the number of seconds for missile to just launch forward and not turn.

8) Missile drifting too little / too much.

Set "driftVectorReduction" variable to a higher value for less drift, and lower value for more drift. DO NOT set 1 or below.

9) You want the missile to launch vertically first to clear the ship, before firing forward thrusters.

Set "verticalTakeoff" to "true". Note that the thrusters used for vertical launch is the dampening side, which is either set relative to "strDirectionRefBlock" or based on script detection. Test it first to ensure that it is launching in the correct direction.

10) You want your missile to be invisible to the GFD lock-on.

Set "excludeGFDMissileRadius" to "true". This auto calculates the required negative GFD_BEAM_WIDTH to shrink all detected radius, so that your missile, and all other grid of same size, is invisible to the lock-on. Beware, grids smaller than this width will have its radius counting the other way upwards (Very small grids will be enlarged by this).

11) You cannot get initial lock-on despite having everything setup properly and your ship do not have no loose grids (Rotors, connectors, docked ships etc).

If your ship is using projector, it will interfere with the lock-on. As of v1.137, the GFD can pick up projector grids as separate grid.
Last edited by Alysius; 4 Jun, 2016 @ 8:49am
< >
Showing 1-14 of 14 comments
mx.nova 30 Jun, 2016 @ 5:05am 
Is it possible to have multiple missiles on your ship and fire them one by one? Whenever I trigger the timer block on one of the missiles, all of them fire at once and the guidance is broken.
Alysius  [developer] 30 Jun, 2016 @ 5:56am 
This shouldnt happen. Since the Timer Block only looping one missile's PB (programmable block). If there are 10 missiles, there will be 10 sets of Timer and PB, each paired individually.
Alysius  [developer] 30 Jun, 2016 @ 7:25am 
Is it grouped and you happen to triggered all of them at once? The script is built to allow easy copy and paste. Can you post a setup world showing the issue?
mx.nova 30 Jun, 2016 @ 7:37am 
Nevermind, I tried it again and it works perfectly. I was probably too impatient with the lock on, although that doesn't explain why it fired all missiles at once. The game probably just derped a little. Sorry for wasting your time, I should have just experimented a bit more.
Alysius  [developer] 30 Jun, 2016 @ 7:38am 
Np, nice to hear it is solved :)
ZezzMan 5 Jul, 2016 @ 4:15am 
so i used to use the old script on large missiles that was using gravity drive(gravity gen with mass block) as propulsion and it works great, so i tried the new script on it and struggled for it to work. after launching the missile it would active, the missile will go in a straightline and not lock on to the target. so i did test and it seems to not run the script bc thrusters wasnt found and therefore the missile will not run untill i placed a thruster on it. so just asking if there is any solution for it so that i dont hav to use thrusters (the missile used and tested in mode 0).
flori1994 13 Aug, 2016 @ 5:07pm 
i want to set up a missile system like the guided missile destroyers from the us navy but the missile is mounted to the modded block attachment block, technically its a rotor, what should i set up as the missile it self is connected with a mergeblock?
Alysius  [developer] 15 Aug, 2016 @ 2:47am 
if the detaching portion is the merge block, you can just use default settings. If its the rotor, u need to use missileDetachPortType = 1
AtomicBlastPony 2 Sep, 2016 @ 7:27am 
I wanted to make a guided air-to-air missile for my aircraft using mode 0, and in the process I faced a lot of problems (like missile thrusters and gyroscope working as part of the ship, making it faster and more maneuverable than I wanted), but I've managed to find a solution for all of them but one. When I try to launch the missile, instead of detaching the merge block it detaches the warheads, programming block, timer, remote control and gyroscope from the rest of the missile, causing them to fall, while the thrusters and merge block stay on the fighter. I checked the programmable block but the missileDetachPortType is 0 so it should detach the merge block...
I'm using the torpedo mod.
EDIT: I've read the old comments, found out the small merge blocks won't work well with this script. This can be fixed by making the timer disable the block rather than relying on the script for it.
Last edited by AtomicBlastPony; 2 Sep, 2016 @ 10:09am
Alysius  [developer] 2 Sep, 2016 @ 10:25am 
You can also set the strDetachPort to the exact name of the merge block to detach
so script wont auto detect the wrong one.
AtomicBlastPony 5 Sep, 2016 @ 12:36am 
Originally posted by Alysius:
You can also set the strDetachPort to the exact name of the merge block to detach
so script wont auto detect the wrong one.
I tried that, strDetachPort causes errors. Either way, problem solved. I had a problem placing them on my ship because it used the missile engines and gyroscopes making it uncontrollable, but I fixed it by adding them to a group and making the timer block also loop turning the group on, and then making them off by default. I also placed a timer block on the ship that looped turning them off, making sure they're only enabled when fully detached.
SKEED ETO 21 Oct, 2016 @ 2:04pm 
maby a dumb qeustion i have been having troubles with a build of mine where i wanted to launch a missile side ways for Clearence how ever im having trouble with ... Set "verticalTakeoff" to "true". Note that the thrusters used for vertical launch is the dampening side, which is either set relative to "strDirectionRefBlock" or based on script detection. Test it first to ensure that it is launching in the correct direction. ..... Do you mean with this that i should give my Side Thrusters a seperate name like [SIDE_THRUSTERS] and Puth it into the script behind "strDirectionRefBlock" " here " or can it be just a sensor on the side with the reference ??
Alysius  [developer] 21 Oct, 2016 @ 5:59pm 
The current script only supports dampener side, which is the bottom side relative to the strDirectiomRefBlock (if not specified then it will be the side that has 2nd largest thrust after filtering the main thrusters). May need aome special modification to make it have an exclusive side launching thrusters (which means you have Main, Dampener amd Side facing thrusters).
SKEED ETO 22 Oct, 2016 @ 2:14am 
oke thank you :) ! makes sence
< >
Showing 1-14 of 14 comments
Per page: 1530 50