Space Engineers

Space Engineers

WeaponCore Autofire Script
73 Comments
BAKADAKALAKA556 3 Jul @ 3:14pm 
is there a way to get auto locking of grids using the script but not firing? almost like a fire control radar
Bodyboarder2528 9 Jun @ 12:01am 
hey is this still compatible with the latest WC as it doesnt seem to fire and might need to change it to a different mode
TangoZulu 29 Nov, 2023 @ 8:03pm 
@BAKADAKALAKA556 Not sure if you have figured it out yet, but I think your issue is not using the open and close brackets []
Example: [Auto-Fire] Homing missiles
Example 2: Homing Missiles [Auto-Fire]
BAKADAKALAKA556 10 Oct, 2023 @ 11:00pm 
i can't seem to get the script to work I created a group called Auto-Fire. is the script broken or am I missing something?
Jackaroo 24 Apr, 2023 @ 9:58am 
69th comment this works so well
Spec-Ops Mexican 7 Mar, 2023 @ 11:59am 
What mods are supported? I seem to have the issue of the ai not targeting anything or firing the missiles
Fury 31 Dec, 2022 @ 9:57am 
If it gives you another data point, I have this script working with the archer series right now. I tweaked the logic to fire when something is targeted rather than just when a target is on the threat list, but other than that it's pretty much untouched. I have noticed some of the homing missiles go through changes, though. I think the archer series gained the ability to dumb-fire when there's no target, for example.
Sigmund Froid  [author] 30 Dec, 2022 @ 5:27am 
I'll have to give it a look, if the group is initialized correctly there shouldn't be a reason why it doesn't work unless WC has made bigger changes to homing missiles that the m-12 isn't using.
Nightraid [Mine] 30 Dec, 2022 @ 2:38am 
Hi, tried this and it works with the m-12 swarmer. My problem is it does not work with other homing missiles like M-2 or the 42/58 archer series. Any idea why is that?
Sigmund Froid  [author] 26 Nov, 2022 @ 4:48am 
Thank you! While I am certainly not the best programmer I had hoped others would be able to make use of it.
Fury 25 Nov, 2022 @ 5:30pm 
That makes more sense. Yeah, this just fires missiles automatically when you have a target now. I appreciate all your WC work by the way. I've been able to figure out a lot of how the mod works by reading your scripts as examples.
Sigmund Froid  [author] 25 Nov, 2022 @ 2:40pm 
Sorry for the late reply, yes that was the intention, although since I made this things changed, and it might just be a limitation of weaponcore now, never really did any testing on this again.
Fury 9 Nov, 2022 @ 8:05pm 
As long as I'm in the comments, I might as well ask you to confirm something. Is it possible for this script to fire homing weapons without a player targeting something first, or will it only work with human intervention?
Fury 9 Nov, 2022 @ 8:01pm 
I ran into the "illegal characters" error too. It's just the MyIni.Get calls choking on the group name. Your description says to use the tag "[Auto-Fire]" in the name of the weapon group, but "[" and "]" are not valid characters. The script works fine when I use "Auto-Fire" as the tag instead. Maybe you updated the script but not the description at some point?
Sigmund Froid  [author] 30 Jun, 2022 @ 8:48am 
I'll take a look at that later, that's new...
GodShake 30 Jun, 2022 @ 8:28am 
the script gives an error "illegal characters /r /n etc."
Sigmund Froid  [author] 12 Mar, 2022 @ 3:26am 
It appears I haven't applied the changes of last month here on Steam yet, the script should now work again
Bodyboarder2528 12 Mar, 2022 @ 3:01am 
hi im getting Weaponcore Api is failing. could this be due to the latest updates?
Sigmund Froid  [author] 29 Nov, 2021 @ 11:33am 
I'd have to do some investigating but if I can detect it using the Api it should be quite easy to do.
ribera1945e 29 Nov, 2021 @ 2:22am 
Are there any plans to support weapons that require lock-on by pressing NumPad0?
Bodyboarder2528 11 Oct, 2021 @ 2:10am 
cheers
Sigmund Froid  [author] 11 Oct, 2021 @ 1:08am 
Yes CoreSystems fixed the bug with FireOnce so now the script should work like before.
Bodyboarder2528 10 Oct, 2021 @ 7:11pm 
does this work with coresystems still?
Sigmund Froid  [author] 1 Oct, 2021 @ 3:02am 
The update just now should allow you to shoot weapons until they reload, and fix a CoreSystems bug.
Sigmund Froid  [author] 30 Sep, 2021 @ 2:13pm 
I'll see about it. Might publish it separately though.
The Caveman 30 Sep, 2021 @ 1:53pm 
i did it with timers, but i wanted a script way to do it. i have to have 1 timer per launcher, gets pcu heavy and intensive on the server. May just incorporate this along side of that.
ATF_Coldblooded Carebear || 30 Sep, 2021 @ 8:37am 
lvlercttv you could always use timer block for this but pending on how many launcher you will need à similar amount +1 of timer block the first will set to activate the launcher and Twigger the the second one TB... and the last one Twigger the first one. The extra one is set to stop all TB ...
This was my novice way I found to do this in sequence.
The Caveman 30 Sep, 2021 @ 12:58am 
i was just wondering if there was a way to fire a weapon for a set time, then move to the next, fire for the same time, wash rinse repeat
Sigmund Froid  [author] 30 Sep, 2021 @ 12:19am 
Sadly I barely have any access to the ammo of a weapon via the api. Maybe I'm just overlooking a vanilla way to do it but so far I haven't found anything.
The Caveman 29 Sep, 2021 @ 11:11pm 
Just out of curiosity, could this be setup to fire 1 or 2 weapons at a time, until empty, then move to the next set?


i have 10 Missile pods and they take 7 seconds to fire all missiles in them and 58 seconds to reload, i want to set up something to fire one at a time, then move to the next, without timers.... to create a continuous stream
Bodyboarder2528 14 Sep, 2021 @ 1:41pm 
Ash just informed me "the API was broken until a few days ago, if this person is still encountering issues can you please ask them to report them in the CoreSystems discord"
Bodyboarder2528 14 Sep, 2021 @ 4:29am 
oh that needs to be changed now lol as MES needs WC v2 if people want the WC features now also WC v1 is not getting much support now as im in their discord
Sigmund Froid  [author] 14 Sep, 2021 @ 3:59am 
As I said the backround API doesn't work there isn't much I can do about that. In fact I can't even isolate if this bug would occur if CoreSystems is properly working. Again refer to the description of CoreSystems, it is not intended to be used by normal users at this time and when finished will be merged with WeaponCore
Bodyboarder2528 14 Sep, 2021 @ 3:05am 
it doesnt crash but also doesnt trigger the weapons to fire
Sigmund Froid  [author] 14 Sep, 2021 @ 2:36am 
I don't know actually do anything about this yet. the issue is that loading CoreSystems manually breaks weaponCore already according to its description. As such I can say that my script does not crash, however the api functions do not work as they should.
Sigmund Froid  [author] 14 Sep, 2021 @ 1:01am 
Looking at WeaponCore/CoreSystems I can't see anything specific which should break this script. I'll check on it later to see if anything pops up ingame.
Bodyboarder2528 13 Sep, 2021 @ 5:11pm 
Can you please make one that works with coreparts which is weaponcore v2
Fischchen 19 Aug, 2021 @ 6:20am 
This dosent seem to work
Syphond 5 Jul, 2021 @ 10:12pm 
Also the script seems to limit missile range to 3.5k even though they have an engagement range of 10k
Syphond 5 Jul, 2021 @ 9:37pm 
Not sure if this is a bug or just something to do with how things work, but the script will continue to launch missiles since it detects an enemy grid even though the enemy grid has nothing the missiles will track on it. basicly if the enemy is listed in the entity list it keeps firing reguardless if the missile can home in. This leads to expensive costs on lost missiles. Is there anything that can be done about this.
pyro557 29 Apr, 2021 @ 5:31am 
I dont know if i am doing something wrong(which is pretty likely i havent played or modded space engineers in quite awhile until now) but when i put the tag in my homing rockets dont fire i can only use them manually the first time i built my m8s they fired on something without the script then got destroyed i rebuilt them and with or without the script they wont auto fire.
Kaito 23 Apr, 2021 @ 9:31am 
Could this replace Whip's Weapon Salvo script?
Bodyboarder2528 11 Apr, 2021 @ 3:45am 
it started working again on restart so idk whats going on lol
Sigmund Froid  [author] 11 Apr, 2021 @ 2:14am 
@Myth ︻デ 一 People reported something like this on the homing missile mod recently. I'll still look into it though maybe something is broken on my end.

@bodyboarder what does the script print in the terminal control window?
Myth 10 Apr, 2021 @ 3:55pm 
This just makes the homing missiles fire forever, even when no enemy grid is in range.
Bodyboarder2528 9 Apr, 2021 @ 6:07am 
ok this has now stopped working for me
Bodyboarder2528 2 Apr, 2021 @ 5:26am 
it works for me on DS been using it all day
Sigmund Froid  [author] 2 Apr, 2021 @ 4:51am 
@BloodyBathSalt In my testing I couldn't reproduce the issue so far could you maybe give me the name of the WeaponGroup you wanted to use.
Sigmund Froid  [author] 2 Apr, 2021 @ 3:12am 
Possibly it seems Darkstar updated the API I'll have to check.
BloodyBathSalt 2 Apr, 2021 @ 1:12am 
is this script broken now? It doesn't seem to fire the missiles and when I recompile the script it gives me the 'section contains illegal characters' exception