Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
it's will be force loaded and damage the working guidance mod.
The sender code is really simple :
public void Main(string argument, UpdateType updateSource) {
IGC.SendBroadcastMessage("TorpedoGuidancePB",
argument
);
Echo("Your order was broadcasted " + argument));
}
Its too bad there is no indicator for when the torpedo reaches its gps, it either blows up or flies around in circles but its status is always idle, so there is no way to pre-program a set of GPS without either trying to calculate flight time or altering the mod itself. This was my original idea.
I can take a look into your suggestion, but I doubt I'll get around to it til next weekend.
The scout transmits: the GPS of the target, the aiming point over the target (~ 10km).
The rocket determines its coordinates, marks a point above itself (~ 10km) for vertical takeoff, flies to a point above itself, at approach it reorients to a point above the target (or several intermediate points), not reaching a certain distance to the point above the target, reorienting to the target , changes the mode from "GPS Mode" to "Lock-On To GPS Area" and locks the target.
...BOOM
Something like this.
NavLaunch NL = new NavLaunch();
public Program()
{
Runtime.UpdateFrequency = UpdateFrequency.Update10;
}
public void Main(string argument)
{
NL.Run(this, argument);
}
private class NavLaunch
{
public void Run(Program root, string command)
{
List<IMyBroadcastListener> listeners = new List<IMyBroadcastListener>();
root.IGC.RegisterBroadcastListener("Target");
root.IGC.GetBroadcastListeners(listeners);
listeners[0].SetMessageCallback("Target");
List<IMyRadioAntenna> guidBlocks = new List<IMyRadioAntenna>();
root.GridTerminalSystem.GetBlocksOfType(guidBlocks);
switch (command)
{
case "Target":
foreach (var item in guidBlocks)
{
//...
item.SetValue<Vector3D>("Adn.PropertyGPSCoordinates", (Vector3D)listeners[0].AcceptMessage().Data);
//...
}
break;
//...
}
}
}
2) I have also added the ability to change launch type through the script.
3) Fixed a bug with the multiple torpedo launch argument.
4) I have added completely new functionality, you can now string commands together and pass them together into the script for example if you want to set the guidance to GPS mode, then set the GPS and then tell it to fire you can use the following
ACTIONLIST;type 2;GPS:gpsLocation: 15:-5:2.5;LAUNCH
If anybody has any suggestions on any other features they want let me know.
If this can work I can see some cool applications for it in concert with antennias and radar mods that autolock based on argument passing.
if(command.ToUpper() == "GPS")
{
Vector3D target;
Vector3D.TryParse(unit, out target);
for (int i = 0; i < gdblocks.Count; i++)
{
gdblocks[i].ApplyAction("OnOff_On");
gdblocks[i].SetValue<Vector3D>("Adn.PropertyGPSCoordinates", target);
gdblocks[i].ApplyAction("OnOff_Off");
}
}
Argument format: GPS {X:12.45}{Y:11.45}{Z:78.65}