Space Engineers

Space Engineers

WeaponCoreScript-Template
18 Comments
BAKADAKALAKA556 24 Sep, 2023 @ 4:11am 
i'm building an S-300 trailer. is there a script that can get the vertical launchers to fire on a detected target from the AI? no user interaction just grid AI identify the target and launchers sequence fire
Devlah 9 Jun, 2023 @ 8:01am 
So there's this little pet project I am working on, perhaps you could provide some insight?
There's this Modpack "Star Trek Mod Pack 5.1" (https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2634862322)
that includes a set of weapons designated as "Fleet Support".
They sort of behave like fixed weapons that spawn in entities when fired. They use Weaponcore for targeting, but will not acquire targets on their own like a turret would, requiring a user to manually designate a target via the UI.
As I'd like to setup these fleet support weapons as automated defense options for a shipyard, I'm trying to figure out a way to designate a target for these automously.
Firing is easy. A long range proximity sensor with the "Shoot on" setting can do that, but designating a target seems to be the challenge. Without a target, they do nothing.
Any help would be greatly appreciated.
Sigmund Froid  [author] 7 Jan, 2023 @ 3:28pm 
@Daniel. For some weapons the Autofire Script in the collection above might work... If it doesn't, I'm currently investigating an issue with that Script regarding homing weapons
Daniel. 7 Jan, 2023 @ 11:37am 
can you make homming missiles autofire on targets without manualy locking on them from the cockpit ?
Rhubarb Bikini 3 Aug, 2022 @ 7:00am 
You can delete our convo if you wish.
Rhubarb Bikini 3 Aug, 2022 @ 6:59am 
Just tested and worked fine. Thank you so much :)
Sigmund Froid  [author] 3 Aug, 2022 @ 5:03am 
Seems like I forgot to implement an API change from earlier. It should work now.
Sigmund Froid  [author] 3 Aug, 2022 @ 4:55am 
Yeah I'll go check if something broke
Rhubarb Bikini 3 Aug, 2022 @ 4:53am 
i had a helm - didnt work. i removed, didnt work, added a"cockpit" still doesnt work
Rhubarb Bikini 3 Aug, 2022 @ 4:52am 
still failed with no cockpits - thanks for your help so far.
Sigmund Froid  [author] 3 Aug, 2022 @ 4:51am 
Yes, that's why WeaponCore needs one
Rhubarb Bikini 3 Aug, 2022 @ 4:51am 
yes. I will try without cockpit. A ship will always have cockpits though!
Rhubarb Bikini 3 Aug, 2022 @ 4:45am 
catch (Exception e)
Sigmund Froid  [author] 3 Aug, 2022 @ 4:45am 
Do you already have a cockpit on the grid?
Rhubarb Bikini 3 Aug, 2022 @ 4:43am 
I have the weapons core installed. I know because the arxy weapons all work nicely. I pasted the script into a PB, and pasted this script. Fixed the e error, added "exception e", but I get "WeaponCore API is failing" - what do I need to do? Thanks
Sigmund Froid  [author] 29 Oct, 2021 @ 12:52am 
In theory yes , it might even already work when using Whips Radar and the addon fo it that I made, though I haven't done any testing on that so far.
The Caveman 28 Oct, 2021 @ 6:47pm 
Is there a way to get Whips WHAM and LAMP script to function on Weapon Core turrets?
Sigmund Froid  [author] 11 Oct, 2020 @ 2:32am 
PSA: DarkStar updated the API and broke the GetWeaponTarget and GetAIFocus functions; they have been updated to use MyDetectedEntityInfo, changes are already included in the guide.