安装 Steam						
					
				
				
									登录
											 | 
						语言
						
																																															繁體中文(繁体中文)
																													日本語(日语)
																													한국어(韩语)
																													ไทย(泰语)
																													български(保加利亚语)
																													Čeština(捷克语)
																													Dansk(丹麦语)
																													Deutsch(德语)
																													English(英语)
																													Español-España(西班牙语 - 西班牙)
																													Español - Latinoamérica(西班牙语 - 拉丁美洲)
																													Ελληνικά(希腊语)
																													Français(法语)
																													Italiano(意大利语)
																													Bahasa Indonesia(印度尼西亚语)
																													Magyar(匈牙利语)
																													Nederlands(荷兰语)
																													Norsk(挪威语)
																													Polski(波兰语)
																													Português(葡萄牙语 - 葡萄牙)
																													Português-Brasil(葡萄牙语 - 巴西)
																													Română(罗马尼亚语)
																													Русский(俄语)
																													Suomi(芬兰语)
																													Svenska(瑞典语)
																													Türkçe(土耳其语)
																													Tiếng Việt(越南语)
																													Українська(乌克兰语)
																									报告翻译问题
							
						
 
											 
													






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}