Space Engineers

Space Engineers

112 voti
[OUTDATED] Whip's Weapon Sequencer [SINGLE GROUP]
   
Premio
Aggiungi ai preferiti
Preferito
Rimuovi dai preferiti
Dimensioni del file
Pubblicato in data
Aggiornato in data
2.978 KB
1 set 2015, ore 21:12
30 mag 2017, ore 14:25
6 note di rilascio ( visualizza )

Sottoscrivi per scaricare
[OUTDATED] Whip's Weapon Sequencer [SINGLE GROUP]

In 1 collezione di Whiplash141
Whip's Script Archive
5 elementi
Descrizione
ATTENTION: This code has been replaced by my Weapon Salvo code!

Whiplash's Weapon Sequencing Script
Howdy!

Summary
This script sequences a group of fixed weapons so that you can achieve a faster continuous rate of fire. This script works with vanilla weapons AND modded ones! The script also supports various arguments to allow the user to customize various settings. The best part is that you only need one program and one timer for all of this! To fire the weapons tab in the "G" menu and go to weapons and tools, select the weapon that you wish to fire, then you can fire the weapons like you normally would. Additionally, weapons sequenced buy this script can be toggled via arguments with toolbar binds; see the arguments section for more info.

NEW: The code will now fire weapons in alphabetical order :D

[Maximum Sustainable Rate of Fire] = [Standard Rate of Fire] * [Number of sequenced weapons]
  • For small grid rocket launchers, the standard rate of fire is 1 rocket per second. Thus the maximum sustainable rate of fire for 3 sequenced rocket tubes is 1*3 or 3 rockets per second.
  • For LARGE grid rocket launchers, the standard rate of fire is 4 rockets per second. Thus the maximum sustainable rate of fire for 3 sequenced rocket tubes is 4*3 or 12 rockets per second.

NOTE: The script will round the RoF, this is not a bug!

Instructions

See the first three images for a visual tutorial :)
  1. Create a program and load in this code
  2. Create a timer. Assign the actions to the following:
    • "trigger now" itself
    • "start" itself
    • Run this program [NO ARGUMENTS YET!]
  3. Add the phrase "[Sequenced]" into the name of weapons u want to sequence (without quotes)
  4. Start the timer


Arguments

Type in these arguments without quotes. These arguments can be input manually,
through timers, or through sensors. Letter case is unimportant. Seperate
multiple arguments with a semicolon (see examples further down)
Argument
Function
rate <integer>
changes the rate of fire in rounds per second
delay <integer>
changes delay between shots to be in terms of frames (60 frames = 1 second)
default
Lets the script to set the fire rate automatically based on the number of
available weapons. The script will attempt to fire all sequenced weapons in the
span of one second with this particular setting. The script will start in this
mode by default
on
Toggles weapons firing on
off
Toggles weapons firing off
toggle
Toggles weapons firing on/off


Examples
  • "on;default" will toggle the weapons on and use default rate of fire
  • "rate 10" will set the rate of fire to 10 rounds per second
  • "delay 3" will set the delay between weapons to 3 frames


FAQ

Q: Does the timer or the program block need to be named anything specific?
A: Nope :)

Q: Why pick this script over other sequencers?
A: Because it would make me feel awesome! Oh and because this script allows you to fire sequenced weapons with mouse click AND toolbar binds :D

Q: Why do you say "Howdy" so much?
A: Because I am the loudest and proudest member of the Fightin' Texas Aggie Class of 2018!

Q: Can I modify your code?
A: Of course! As long as you credit me for the original code I am totally cool with it. Just don't be like this idiot[imgur.com] is all I ask :)

Authors Notes
KSH Thread[forum.keenswh.com]

Thanks to Ronin for suggesting an alphabetical sorting method :)

If you have any questions feel free to post them in the comments!

Whiplash141 - http://steamcommunity.com/id/Whiplash141/
> Please do not send me random friend requests! Leave comments on my profile if you wish to contact me directly :)
147 commenti
Whiplash141  [autore] 5 dic 2017, ore 16:02 
Howdy @Mr. Ditch: I have just released a new code aimed at replacing this one. Give it a try :)
https://steamcommunity.com/sharedfiles/filedetails/?id=1221921128
Mr. Ditch 3 dic 2017, ore 19:11 
I feel like I've been on here asking this before, but I'm having an issue with geting this to fire all my rocket launchers on a new ship. all have sequenced in the name, the script detects them, locks the rps at 15, then fires one or two, and continues to empty a single launcher.
LettuceSupreme (Nitron X) 3 ott 2017, ore 12:04 
You're the man @Whiplash141, everyone on SE owes you a beer to two.
Whiplash141  [autore] 1 ott 2017, ore 21:43 
@Rampage:
Yes I do: https://i.imgur.com/u0thrQm.png

Give me a few days to get all the instructions and stuff done so I can publish it :)
LettuceSupreme (Nitron X) 30 set 2017, ore 19:08 
Howdy, Whip. Is there an easily implementable way to make this script work for multiple groups? I have a large weapoins array that has rockets set into 4 zones, I have 4 of your scripts running so each zone can fire 60rps, but simspeed takes a major hit from the programs running (before I even get to fire a single rocket). I usually see drops between .2 & .4.
ZenSei 18 set 2017, ore 11:05 
"upload a world where it happens so I can try and find the root cause?" - yes I can, and also thx for the quick reply

"Also, your english is better than mine and I'm a native speaker XD" - Ok xD thanks
Whiplash141  [autore] 18 set 2017, ore 8:59 
"so I got this problem that whenever I want to delete/disconnect the Programmable block with the Sequencer script loaded, it instantly crashes my game and I get thrown back to the last autosave."

Huh... That sounds like a game bug. Does it only happen with this script? If so, could you upload a world where it happens so I can try and find the root cause?

Also, your english is better than mine and I'm a native speaker XD
ZenSei 18 set 2017, ore 7:16 
also english isn't my first language so please excuse mistakes
ZenSei 18 set 2017, ore 7:14 
Hey there Whip,

(short info: I'm currently working on different versions of a turret [like, one with gatlings, one with rockets, etc.] with the MART script combined with this one {and possibly the turret slaving})

so I got this problem that whenever I want to delete/disconnect the Programmable block with the Sequencer script loaded, it instantly crashes my game and I get thrown back to the last autosave. This is really annoying because 1. all my changes after the autosave to the turret are gone 2. the turrets are designed to be standalone and just have to be plopped on the ship to work so they can't have the base (on which I build and test them) saved too.

but I also absolutly love your scripts and these are super helpfull and got me out of my lazyness to actually do something.
Keep up the great work!