One sound file needed twice at the same time. - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html) +--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html) +---- Forum: Development (https://www.frictionalgames.com/forum/forum-82.html) +---- Thread: One sound file needed twice at the same time. (/thread-31288.html) |
One sound file needed twice at the same time. - Kanthos - 10-11-2015 Hey guys, hope you understood the topic ^^ I have a problem with door sounds: Via script i manage to open two large_tau_swingdoors using two buttons. But when i press one button the sound file of the opening/closing animation of the swingdoors can be used only at one door. But i need them at both of them. Can anyone offer a solution? ^^ Greets and thanks! RE: One sound file needed twice at the same time. - Mudbill - 10-11-2015 Could you show the script? This should be relatively simple. RE: One sound file needed twice at the same time. - WALP - 10-11-2015 I dont get why not? You have an interact callback on your button, it triggers a function, in that function you have 2 functions that play a sound at 2 different entities. should be simple. RE: One sound file needed twice at the same time. - Kanthos - 10-12-2015 The animation needs 3 sounds for the opening sequence and 3 for the closing one. That´s a lot of work and so i thought you guys could help me out with a quicker solution. My code: _________________________________________________________________________________________ void AirlockButton(const tString &in asEntity) { Sound_CreateAtEntity("ButtonPress", "Entities_Station/object/sat_shell/button", asEntity); MovingButton_SetDisabled("deepsea_large_1",true); MovingButton_SetDisabled("deepsea_large_2",true); Map_AddTimer("AirlockDoorButtonTimer",12,"TimerEnableButton"); if (AirlockEnergy==true && InnerAirlockDoorsClosed==true) { SlideDoor_SetClosed("cool1", false); Map_AddTimer("AirlockCool2Open",0.5,"TimerCool2Open"); InnerAirlockDoorsClosed=false; } if (AirlockEnergy==true && InnerAirlockDoorsClosed==false) { SlideDoor_SetClosed("cool1", true); Map_AddTimer("AirlockCool2Closed",0.5,"TimerCool2Close"); InnerAirlockDoorsClosed=true; } } void TimerCool2Close(const tString&in asEntity) { SlideDoor_SetClosed("cool2", true); } void TimerCool2Open(const tString&in asEntity) { SlideDoor_SetClosed("cool2", false); } void TimerEnableButton(const tString&in asEntity) { MovingButton_SetDisabled("deepsea_large_1",false); MovingButton_SetDisabled("deepsea_large_2",false); } __________________________________________________________________________ How i said, the only thing that happens with the doors is that they get closed and opened. Greets! RE: One sound file needed twice at the same time. - WALP - 10-12-2015 (10-12-2015, 09:06 PM)Kanthos Wrote: The animation needs 3 sounds for the opening sequence and 3 for the closing one. That´s a lot of work and so i thought you guys could help me out with a quicker solution. Without looking too much at your script, I can see that there is only one line that plays a sound, and not much indication of that line being called more than once. only 1 sound should play only once. if you want more you add more sounds or call the same sound again. RE: One sound file needed twice at the same time. - Kanthos - 10-12-2015 Thats the sound of a button being pressed... The animation (and the sound of the animation) is called automatically when the door opens/closes. RE: One sound file needed twice at the same time. - WALP - 10-12-2015 (10-12-2015, 10:03 PM)Kanthos Wrote: Thats the sound of a button being pressed... In that case I will need you to point me specifically in the direction of that animated door and where it is located. a name wont be enough. RE: One sound file needed twice at the same time. - Kanthos - 10-13-2015 it would have been the swingdoor_tau_large, but i managed it differently. I couldn´t solve the problem with the sound, but reorganized my doors so that the sounds are not needed at the same time. |