Space Engineers

Space Engineers

Torpedo
13 Comments
Return of Bob 21 Sep, 2015 @ 3:29pm 
I think its the grid-pivot changning, but im not sure...
Return of Bob 21 Sep, 2015 @ 2:52pm 
i could need some help here, i used your script to make a missile that works when pasted and fired in empty space, but after puting them on mergeblocks and making timerblocks fire them in a staggerd fire mode, the get to a stand still in space, with a Execption cought; "Input string was not in a correct format" I find it very strange since exacly the same missile works perfecly fine aslong as i dont use mergeblocks/timers...

Thanks inbeforehand

Böb
Lynnuxx 26 Mar, 2015 @ 4:12pm 
GridIntegerToWorld is not available anymore. Change line 243, 244 to

var p = mult(localAxis[0], x(lP)) + mult(localAxis[1], y(lP)) + mult(localAxis[2], z(lP))
+ radar.GetPosition();

and in function getGridData():

//Get world coordinates of the center block
var tO = centerBlock.GetPosition();
//Get world coordinates for positions, that are shifted in all three axes aroud the center block.
var tX = tO + veci(10, 0, 0);
var tY = tO + veci(0, 10, 0);
var tZ = tO + veci(0, 0, -10);
Baleur 22 Feb, 2015 @ 3:25pm 
Im wanting to adapt this to simply get a self built turret (with rotors and fixed weapons) to track a target (triggering the guns to shoot is simple enough with vanilla means). Is it possible, and if so, how?
Thanks!
dustybear 10 Feb, 2015 @ 8:55pm 
I think the author needs to replace his usage of gridintegertoworld with getposition. Otherwise this is very cool
SEMTEX 9 Feb, 2015 @ 9:44pm 
same problem here ...
dustybear 30 Jan, 2015 @ 3:28pm 
Specifically it says the code is missing a Using directive.
dustybear 30 Jan, 2015 @ 2:12am 
The programmable block is throwing out some errors now about "gridintegertoworld" being undefined. Some kind of recent change with the programmable block features?
Lynnuxx 28 Jan, 2015 @ 3:42pm 
A question since I don't know C# and the SE API well enough (yet). Can you use the Orientation property (IMyCubeBlock) of the sensor block directly for easier calculation of the absolute position of the target ? You calculate LocalAxis for this...
Lynnuxx 28 Jan, 2015 @ 2:32pm 
Ok, you can have a ship with radar (beacon and sensors) and you can have the torpedo connected to it. The torpedo needs a beacon and radar, too. Once you identified one of the targets your ship has found to be a turret you have to assign it to the torpedo.
If the turret is [radarX] on the ships' sensor then write [radar+X] into the torpedos' sensor. Hopefully this will work ;-)
Lynnuxx 28 Jan, 2015 @ 2:24pm 
Didn't test it yet, but the pistons and rotor of the decoy arms of my Black Adder are 10 friendly targets found by the radar. So possibly a manned turret will also be detected as a seperate object. But how to judge what's a turret and what's the ship ?
cookiehunter  [author] 11 Jan, 2015 @ 10:10pm 
Do you mean self build turrets using 2 rotors or the turret block, that comes with the game. Currently there is no way how you could get excess to the blocks on a different grid. That means there is no possibility you could get the positions of turret blocks. Self build turrets are possible to detect. Because of the rotors, the turret would count as 2 targets seperated from the main ship. That can be used to find it.
Jmattspartacus 11 Jan, 2015 @ 9:28pm 
Do you think it'd be possible to use some of the concepts used with this to make a way to accurately aim manned turrets at ranges>2km? I'm not very good with the scripting yet so asking someone with a little more knowledge seemed appropriate