Space Engineers

Space Engineers

[Archive] Rdav's Turret-Tracking-Script
280 kommentarer
Darkness Overlord 28. okt. 2018 kl. 9:46 
Why rotor with sensor, armor block and gun reverce on 360X[unlimited]? He crash weapon =/
Avelius 25. apr. 2018 kl. 7:50 
The script doesn't seem to work on small grids.
Avelius 25. apr. 2018 kl. 7:17 
Ok turret moves now (had called the gat turret "Designator" instead of "Director". But turret still spins wrong and seems reversed.
Avelius 25. apr. 2018 kl. 5:18 
Script set-up was successful but the turret does not move at all, I've set everything up correctly, checked everything 3 times. Could you please help me?
Avelius 27. dec. 2017 kl. 13:45 
@Hellfire Yes I know ;) I was just looking for a script, which would make rotor based turrets completely to AI turrets without any director turret to rely on. But thanks for the help man ;D I appreciate it.
Saticron 27. dec. 2017 kl. 12:16 
@[A.G.I.] ◥ ARSTALUS ◤ there is also the MART script if you wont want the turret director

(it helps greatly with tanks)
Rdav  [ophavsmand] 27. dec. 2017 kl. 9:36 
yup
Avelius 27. dec. 2017 kl. 7:16 
Do you need that Turret Director at ALL times?
Saticron 2. dec. 2017 kl. 13:41 
does it just fire when you aim at something or does it shoot when the turret shoots?
JudgeHenryAllenLaidermilk 16. sep. 2017 kl. 12:07 
Hey Rdav love all your stuff man, have a question about alternate usage for this. Instead of having this script fire a gun, is there a way to have it trigger another specific timer block instead? would love to use this for long range detection and triggering of other defences. thanks.
tunamansquare 27. juni 2017 kl. 9:05 
found the problem
Rdav  [ophavsmand] 27. juni 2017 kl. 8:19 
@Afockewulf a) did you read the troubleshooting flowchart? B) this code was superseded by my EZ turret AI code, that's a lot more user friendly to setup, and more powerful,

However if you're keen on a one p-block to rule them all code I'd check out Whiplash 141's workshop, he made a turret code very similar to this,
tunamansquare 27. juni 2017 kl. 7:22 
i did everything and it just spins
Kalec84 1. juni 2017 kl. 14:46 
Anyone alse having it not working any more after the last patch?
Kalec84 28. maj 2017 kl. 7:40 
I'm trying to load the script (double click on the list in the programmable block menu) but it didn't work... is like there is no script
Postwar Vandal 7. apr. 2017 kl. 6:30 
I've been playing around with the script, it's good fun. But it got me thinking that it would be cool to have a script that can track a friendly ship. that way you could have a spotlight following ships when they're coming into dock. Is there a way to adapt this scrip for such usage?
Hirodripto.rl 11. feb. 2017 kl. 1:29 
V Theres a new script......
FцllSїzёd 10. feb. 2017 kl. 19:15 
...When it does actually shoot in the general direction of the target that the director turret is shooting at it usually fires several shots at the target then both turrets for some reason snap back to their default home positions and fire a few shots there before returning to the actual enemy target. The director turret fires straight at the nearby enemy target non stop unless the script is running. Which suggest its return to home position is some side effect of the script.

I have check and rechecked everything in the set up many time and still it wont work. I have tested extensively both on dedicated server and in solo games.
FцllSїzёd 10. feb. 2017 kl. 19:15 
I can't get this to work. Ive been trying for hours. In rare occasions it actually shoots in the direction of the Director turret but its offset by several blocks usually resulting in a complete miss of the target. Even then I can copy and paste the platform and the new one may or may not work.

MOST of the time after I get everything set up the script completely ignores preset rotor limits and almost immediately upon startup rotates both rotors at max speed until everything breaks into tiny pieces.

Hirodripto.rl 23. jan. 2017 kl. 8:35 
V Follow the new versions tutorial exactly.
Stevros1903 22. jan. 2017 kl. 15:19 
Hay is this script still alive or completely replaced with new version as i cant seem to get this to work right always turns the AZ rotor 180 degrees from where i would expect. Would use new version but tried that and it only decided to use 1 the EL rotors and rocket systems not both??
Anyone with any ideas on either i would be very great full.
Hirodripto.rl 18. jan. 2017 kl. 6:07 
Theres a new version of this! HIP HIP! HORRAY!!!!!!!!!!!!!!!!!! (Published in a different publish)
Stevros1903 17. jan. 2017 kl. 11:29 
And sorry also is there any way to set up 2 instances of this code so i could say have one director for my right battery one for my left and 1 for my front?
Stevros1903 17. jan. 2017 kl. 11:15 
Sorry Any way to have this trigger a grinder?? and or a timer so i can use it with a gravity turret?
delta07™ 27. dec. 2016 kl. 5:07 
great idea but its just as deadly to you as it is to the enemy (provided you are not careful)
Hirodripto.rl 25. dec. 2016 kl. 7:36 
DESC: Directing any vanilla or modded turret blocks is easy, simply change the names of any turrets you want to direct 'DIRECTED_TURRETS' and the script will aim them and fire them automatically - Your question @Yendor Mosreh has been answered.
YENDOR MOSREH 24. dec. 2016 kl. 23:40 
i can do this with just the sensors but they are hit and miss they stagger around like a drunk at the toilet pointing all around the bowl it ends you pointing at the target affter a few stumbles
YENDOR MOSREH 24. dec. 2016 kl. 23:35 
can this be used on a ships gyros to point the ship at the target ( and dose it have to be a interior turret can we use a normal turret since small ships dont use the internal turret
Hector 24. dec. 2016 kl. 15:53 
Do you think it would be possible to make a staggered rotation speed, so that if the turret is within a few degrees of its desired alignment, it turns slower? This would probably help a lot with heavier turrets.

Also, including an option for staggered fire would help turrets equipped with, for example, the CSD Battlecannon or weapons of comparable recoil to deal with said recoil.
Hector 24. dec. 2016 kl. 15:43 
Does this script only point the turret in the same azimuth and elevation as the director or does it take into account that turret and director will be a slight bit apart?
Whatever 28. nov. 2016 kl. 0:21 
Probably a bit late here but: If you turn of DIRECTOR's idle movement the turret group just goes frenzy with movement. While the script is active you are unalbe to enable DIRECTOR'S idle movement. Just raising your awareness.
Hirodripto.rl 18. nov. 2016 kl. 10:28 
What if i wanted not all the turrets to use the same DIRECTOR, Do i do like DIRECTOR 2 and so on?
TEMPO 2. okt. 2016 kl. 2:27 
similar script is not what works?
Rdav  [ophavsmand] 1. okt. 2016 kl. 9:18 
@TEMPO
Should do, It's been updated and tested in both dev and stable now
TEMPO 1. okt. 2016 kl. 7:43 
It still works?
Lord Wraith SOL3 24. sep. 2016 kl. 4:16 
@Rdav did not know the script turned off the idle settings, so that solves that problem, next will retry with different setting on the targetting, will do this in an empty world and let you know...
ADM.i.RAL 24. sep. 2016 kl. 4:15 
I have no problems
Rdav  [ophavsmand] 24. sep. 2016 kl. 4:12 
@Lord Wraith
If the director turret isn't tracking it might be something to do with the director turrets targeting settings, the script itself automatically turns off idle rotation, but does not set targetting settings. does the director not track anything at all?
Lord Wraith SOL3 22. sep. 2016 kl. 19:28 
Sorry to tell you this bud, but just tested the system and the turret will not move, just sits there even when a enermy comes around, ran the updated script and followed the instructions for set up, but when i completed it the Director simply went to a fixed forward posistion and i could not reset it into idel movement after that, also would not track a enermy ship, hope you can help:steamsad:
Rdav  [ophavsmand] 22. sep. 2016 kl. 11:30 
@Kopin
Afraid so!, That is at least, until some more of the DEV branch ingame-API gets put into the Stable branch, then I'll be a ble to monitor if a player is clicking or not.
ADM.i.RAL 22. sep. 2016 kl. 11:21 
Weapon on turret shoots without click ,when control DIRECTOR, is it normal?
Rdav  [ophavsmand] 22. sep. 2016 kl. 10:57 
@Lord Wraith [DSN] + [MGE]LeonserGT
Script has been updated to fix the issues, once again the script is fully functional!
Lord Wraith SOL3 21. sep. 2016 kl. 17:06 
Sorry to say that i have tested this mod in both stable and dev, and i also keep getting the same error code when i try to compile it, hope you fix it soon....:steamfacepalm:
Rdav  [ophavsmand] 17. sep. 2016 kl. 5:41 
Didn't realise it was broken, yeah I'll give it some wel deserved love and care soon as I get a free moment, thanks for informing!
LeonserGT 17. sep. 2016 kl. 4:43 
Hey Rdav, now PB changes merged to stable as well, script is totally not working now. Any plans for fixing?
drandarith 25. aug. 2016 kl. 21:35 
Ok. well I'll wait for the patch. Thanks though..
Rdav  [ophavsmand] 25. aug. 2016 kl. 9:38 
@dradndarith,
This is a bug introduced with the latest patch of stable-branch SE, as soon as I can get some time I will release a patch, in the meantime try switching between stable and dev branches and see if the problem appears in both, I believe it stll works in one branch,
drandarith 25. aug. 2016 kl. 1:55 
Recap... I think I know the error.. the Turret (group) needs to be designated by a group name in block terminal. right? What prefix does it use?
drandarith 25. aug. 2016 kl. 0:20 
When checking code for compilation I get this error: program(137,35): Error: 'IMyBlockGroup' Does not contain a definition for 'Blocks' and no extensions methos 'Blocks' accepting a first argument of type 'IMyBlockGroup' could be found (are you missing a using directive or an assembly refference?) ... I have NO idea how to fix this....
MrEvan312 15. aug. 2016 kl. 1:02 
Will this allow me to position Orbital Defense platforms with fixed guns so they will turn and fire the main gun at approaching enemies?