Space Engineers

Space Engineers

View Stats:
How to Trigger a Sound?
I subbed to a script that lets a sensor or button play different sounds, but I cant get it to play a sound AND turn on a light. e.g. Enter a ship and the ship turn on its lights and say "Lights On". the sensor can do one thing or the other. Not both. Is there any way to add more inputs for a sensor rather than the standard two "off/on" ?

Can I have a door trigger a sound?
Last edited by King DaMuncha; Sep 5, 2024 @ 8:36pm
< >
Showing 1-15 of 15 comments
Dantheotherone Sep 5, 2024 @ 8:42pm 
Use a timer block and have the sensor trigger it.
To have a door trigger a sound, I would use a Event Controller.
It has that event in its list of events.
Last edited by Dantheotherone; Sep 5, 2024 @ 8:48pm
King DaMuncha Sep 5, 2024 @ 9:00pm 
I bought this game 2 days ago so I have no idea how to do that.
phfor Sep 5, 2024 @ 9:03pm 
If you get the sensor/button to trigger the timer block, you can load multiple things onto the timer block config, having them ALL trigger

Video on using them, if you need it https://www.youtube.com/watch?v=kUiV56aZrhM
Last edited by phfor; Sep 5, 2024 @ 9:08pm
Dantheotherone Sep 5, 2024 @ 9:08pm 
What I suggest you to do is look up Splitsie's tutorials on YouTube. Some are dated but still pertain to the standard way of building.

I don't know what mod/script you are referring to, so, I can't help you there.
Last edited by Dantheotherone; Sep 5, 2024 @ 9:15pm
King DaMuncha Sep 5, 2024 @ 9:19pm 
Originally posted by phfor:
If you get the sensor/button to trigger the timer block, you can load multiple things onto the timer block config, having them ALL trigger

Video on using them, if you need it https://www.youtube.com/watch?v=kUiV56aZrhM
That means I need a seperate Timer block for each sound. Not what I was after.

This is the script Im using.

https://steamcommunity.com/sharedfiles/filedetails/?id=1401180554
Last edited by King DaMuncha; Sep 5, 2024 @ 9:20pm
Dantheotherone Sep 5, 2024 @ 9:59pm 
That mod was last updated in 2018 and the game has changed a lot in six years.

The mod allows you to play different sounds using one sound block using different activators (buttons, sensors or other means. Thus having only one sound block for many sounds instead of using a separate sound block for each sound.

If understand your problem, You want a sound and a action to occur when a sensor is triggered. Do you also, depending on the situation, want different sounds for the same event?

If it's a easy task such as, for example, have a hanger door open and have it announce door open while turning on a red light then that is fairly straight forward.

I need to go into my experimental world to check some things out and I'll be back with some results.
King DaMuncha Sep 5, 2024 @ 10:32pm 
Originally posted by Dantheotherone:
That mod was last updated in 2018 and the game has changed a lot in six years.

The mod allows you to play different sounds using one sound block using different activators (buttons, sensors or other means. Thus having only one sound block for many sounds instead of using a separate sound block for each sound.

If understand your problem, You want a sound and a action to occur when a sensor is triggered. Do you also, depending on the situation, want different sounds for the same event?

If it's a easy task such as, for example, have a hanger door open and have it announce door open while turning on a red light then that is fairly straight forward.

I need to go into my experimental world to check some things out and I'll be back with some results.
That script works exactly as I wanted. I'm just having trouble getting the sensor to play the sound AND turn on the lights.
Dantheotherone Sep 5, 2024 @ 11:18pm 
There is no way one sensor can play different sounds. It can not select depending on the situation. A kind of friend or foe thing. It can't open a door for a friendly and close it if it's a enemy.

There is no way to stack commands onto a slot of a sensor. The only exception is if the commands are compatible.

A example would be a on/off command and then have the blocks grouped. You walk into a sensor field and all the lights turn on or off.

If they are what I call incompatible commands such as turning on a light and extending a piston. That's where you put them on a timer and trigger it.

You could possibly pass it on to a Event Controller if the action such as a light on or door open or whatever the activator you want to use is on the event list.
The Event Controller has nine slots per tool bar and nine or ten tool bars in total. (Ctrl+ Number of tool bar you want)

For example: The sensor detects you or your ship/rover and opens a door. The Event Controller detects the door is open and then turns on lights, plays the sound block and whatever else you want to happen.

If that is not a option then the only thing I can suggest is using Easy Automation V2.0
I use this and it gives me a lot of freedom to do just about anything I want.

I'll leave the script and guide if you're interested.

https://steamcommunity.com/sharedfiles/filedetails/?id=694296356&searchtext=Easy+Automation+V2.0

https://steamcommunity.com/sharedfiles/filedetails/?id=685206874

Maybe someone else will have a different approach and help you figure it out.
King DaMuncha Sep 5, 2024 @ 11:46pm 
Event controller looks interesting, but again, it only seems to work with one event

Oh and of course Event Controller doesnt have events for detectors. ♥♥♥♥♥♥♥♥♥♥♥, how stupid are the developers? Why do they make playing this buggy ♥♥♥♥ so painful?
Last edited by King DaMuncha; Sep 6, 2024 @ 1:08am
Dantheotherone Sep 6, 2024 @ 2:50am 
I'm not understanding what it is you're trying to accomplish.

Basically that script you are using could be the foundation of a juke box.
Put four songs into the sound block list and set up a button panel to play one of four songs.

Just like the juke box, Keen, put in the game awhile back. In fact you'll find them in the trade stations.

Maybe it would help if you lay it out step by step of the events you want to happen.

For example:
I just wanted to get into my little shuttle craft and leave without pushing buttons.

With a onboard Event Controller checking to see if I had planted my butt in the pilot seat, I made the process fully automatic. All that was needed was two Event Controllers (EC).

When the shuttle craft EC detected me in the seat, it switched off the stockpile for the oxygen and hydrogen tanks, set the batteries to auto, unlocked the connector and started the depressurization of the hangar.

The air vent has two command boxes, one for pressurization and the other for depressurization. So, when it detected the hangar was depressurized it opened the hangar door.

When I returned, I just put the two connectors together touching each other with the magnetic force holding them together and jumped out. The EC saw this and set the tanks to stockpile, batteries to recharge. locked the connector and closed the hangar doors.

The second EC was set to watch the hangar doors and when they were closed, it started the pressurization process.

What is the setup that you're going for?
carl.wear Sep 6, 2024 @ 6:49am 
Originally posted by King DaMuncha:
I bought this game 2 days ago so I have no idea how to do that.

Better to learn rotors and pistons first for a drilling platform. That makes like way easier.
carl.wear Sep 6, 2024 @ 6:50am 
Originally posted by King DaMuncha:
Event controller looks interesting, but again, it only seems to work with one event

Oh and of course Event Controller doesnt have events for detectors. ♥♥♥♥♥♥♥♥♥♥♥, how stupid are the developers? Why do they make playing this buggy ♥♥♥♥ so painful?

Event controllers are good for airlocks. There are vids on YT on how to do them.
King DaMuncha Sep 6, 2024 @ 12:18pm 
Originally posted by carl.wear:
Originally posted by King DaMuncha:
I bought this game 2 days ago so I have no idea how to do that.

Better to learn rotors and pistons first for a drilling platform. That makes like way easier.
What I do is I set out a simple goal, make a small vehicle (ATM Im making a APC tank), and then add on every feature I can one by one figuring out what each part does along the way and how they work. ATM My APC Tank looks like a mobile home inside with tracks.

So I've been trying to make the interior lights turn on (that was easy) and play a event sound when I walk inside (not so easy for something so simple). I did it easily by adding two different sensors but I want one sensor to do the lights AND trigger the sound. So far its been impossible without adding yet more redundant gadgets.

With the multiple sounds script I can have the one speaker play multiple sounds, but I still need a event block for each sound. If I could have a event block that detects all events (Why the devs didnt put this in is insanity) not just the few that are included, then everthing would be perfect.

The event block can detect if something is turned on, but not if something is activated. And it can only handle one event. If it could control every event in the menu at the same time then that would be perfect. ATM you NEED a thousand monkeys on a thousand typewriters just to write Mary has a little Lamb.
Last edited by King DaMuncha; Sep 6, 2024 @ 12:32pm
Dantheotherone Sep 6, 2024 @ 3:42pm 
Here are two Easy Automation code blocks that turns on or off a light and announces it.
Just put them in the custom Data of the sensor.

@LightandSoundOn{
OnOff_On Light
Sound of Sound Block = Lights on
PlaySound Sound Block
}

@LightandSoundOff{
OnOff_Off Light
Sound of Sound Block = Lights off
PlaySound Sound Block
}

In the set up actions of the sensor, drag down the programmable block with Easy Automation on it into the first slot. Select run and enter Sensor (LightandSoundOn)
In the second slot do the same with Sensor (LightandSoundOff)

This with the guide should help you get started.
Last edited by Dantheotherone; Sep 6, 2024 @ 3:44pm
King DaMuncha Sep 6, 2024 @ 6:02pm 
Originally posted by Dantheotherone:
Here are two Easy Automation code blocks that turns on or off a light and announces it.
Just put them in the custom Data of the sensor.

@LightandSoundOn{
OnOff_On Light
Sound of Sound Block = Lights on
PlaySound Sound Block
}

@LightandSoundOff{
OnOff_Off Light
Sound of Sound Block = Lights off
PlaySound Sound Block
}

In the set up actions of the sensor, drag down the programmable block with Easy Automation on it into the first slot. Select run and enter Sensor (LightandSoundOn)
In the second slot do the same with Sensor (LightandSoundOff)

This with the guide should help you get started.
Thx, I'll try this. But Im not running the Easy Automation script in my vehicle right now. I cant figure that one out. Its pretty complicated.

Edit:
Ok I tried it. It doesnt work with the Multisound script. Since the sound library Block from that script is not being called on by the Automation script.
Last edited by King DaMuncha; Sep 6, 2024 @ 6:57pm
< >
Showing 1-15 of 15 comments
Per page: 1530 50

Date Posted: Sep 5, 2024 @ 8:32pm
Posts: 15