Space Engineers

Space Engineers

Not enough ratings
Play Sound Sequence
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
378.739 KB
15 Aug, 2022 @ 12:51pm
16 Aug, 2022 @ 8:30am
2 Change Notes ( view )

Subscribe to download
Play Sound Sequence

Description
This script plays multiple sounds in a sequence using a single sound block. No need to use timer blocks. One programmable block and one sound block is enough to play a sequence of sounds.

This is very useful for mods providing many voice lines which need to be combined to make sense. Just create a sequence of these voice lines and play them by a single command.

For example using voice lines from AQD Computer Voice Lines mod you can have combined voice line like "Enemy sighted, turrets engaging, target acquired..."

Of course, you can still use this script to play a single sound, just pass one sound only in an argument instead of a sound sequence.

Requirements
  1. Programmable Block
  2. Sound Block

Usage
  1. Configure the soundBlockName variable with the name of your Sound Block.
  2. Define the duration of one sound sample in soundSampleDurationTicks variable - in ticks. If you are using samples of multiple lengths ticks should correspond to the longest sound sample in your sequence, otherwise sounds may get interrupted by a next sound in a sequence.
  3. Compile the script.
  4. Run the script with the argument containing list of sounds in a sequence separated by comma, e.g.: AQD_SB_Arc_005, AQD_SB_Arc_009

Advanced Usage
In order to configure timing of individual sound samples, use ":" sign behind each sound sample followed by the sample duration in ticks. If no specific sample duration is set for that that individual sample, default soundSampleDurationTicks will be set.

This enables you to create more precise timing when combining multiple voice samples.

For example passing "SoundBlockAlert1:50, AQD_SB_Arc_097:80, AQD_SB_Arc_096, AQD_SB_Arc_095" will result in:
Sound SoundBlockAlert1 playing for 50 ticks
Sound AQD_SB_Arc_097 playing for 80 ticks
Sound AQD_SB_Arc_096 playing for value of soundSampleDurationTicks ticks
Sound AQD_SB_Arc_095 playing for value of soundSampleDurationTicks ticks, but since this is the last sound in a sequence it does not matter
Popular Discussions View All (1)
4
7 Apr, 2024 @ 8:55am
Fork
Dr. Kevorkian
4 Comments
mJrA 5 Jun, 2024 @ 10:00am 
If you wanna use Sounds from other soundpacks you need the "SubtypeId" From those sounds.

you can find out what the soundblock uses by looking in the modfolder (you will need the Modid number to find the right folder) In that folder inside the Data Folder for a *.sbc, open it with a text editor and look for the SubtypeId. Then you can call those Sound files
Raynor 10 May, 2024 @ 9:54am 
Thank you!
Siam 14 Feb, 2024 @ 3:09pm 
I am trying to use that script but almost all sound don't work.
Is there any specific rule regarding the naming to target sound.
Magna Greymane 30 Dec, 2022 @ 3:51pm 
not overly familliar with how scripts work I am setting up a server do i need to install this like a mod to the srver or should my players just be able to use this?