| 
		
	
		| Kanthos   Junior Member
 
 Posts: 48
 Threads: 7
 Joined: Oct 2015
 Reputation: 
1
 | 
			| One sound file needed twice at the same time. 
 
				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!
 |  |  
	| 10-11-2015, 09:56 PM |  |  
	
		| Mudbill   Muderator
 
 Posts: 3,881
 Threads: 59
 Joined: Apr 2013
 Reputation: 
179
 | 
			| RE: One sound file needed twice at the same time. 
 
				Could you show the script? This should be relatively simple.
			 
 |  |  
	| 10-11-2015, 10:26 PM |  |  
	
		| WALP   Posting Freak
 
 Posts: 1,221
 Threads: 34
 Joined: Aug 2012
 Reputation: 
45
 | 
			| RE: One sound file needed twice at the same time. 
 
				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.
 
				
(This post was last modified: 10-11-2015, 11:01 PM by WALP.)
 |  |  
	| 10-11-2015, 11:00 PM |  |  
	
		| Kanthos   Junior Member
 
 Posts: 48
 Threads: 7
 Joined: Oct 2015
 Reputation: 
1
 | 
			| RE: One sound file needed twice at the same time. 
 
				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!
 |  |  
	| 10-12-2015, 09:06 PM |  |  
	
		| WALP   Posting Freak
 
 Posts: 1,221
 Threads: 34
 Joined: Aug 2012
 Reputation: 
45
 | 
			| RE: One sound file needed twice at the same time. 
 
				 (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.
 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!
 
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.
			 
				
(This post was last modified: 10-12-2015, 09:15 PM by WALP.)
 |  |  
	| 10-12-2015, 09:15 PM |  |  
	
		| Kanthos   Junior Member
 
 Posts: 48
 Threads: 7
 Joined: Oct 2015
 Reputation: 
1
 | 
			| RE: One sound file needed twice at the same time. 
 
				Thats the sound of a button being pressed...
 The animation (and the sound of the animation) is called automatically when the door opens/closes.
 |  |  
	| 10-12-2015, 10:03 PM |  |  
	
		| WALP   Posting Freak
 
 Posts: 1,221
 Threads: 34
 Joined: Aug 2012
 Reputation: 
45
 | 
			| RE: One sound file needed twice at the same time. 
 
				 (10-12-2015, 10:03 PM)Kanthos Wrote:  Thats the sound of a button being pressed...
 The animation (and the sound of the animation) is called automatically when the door opens/closes.
 
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.
			 |  |  
	| 10-12-2015, 10:20 PM |  |  
	
		| Kanthos   Junior Member
 
 Posts: 48
 Threads: 7
 Joined: Oct 2015
 Reputation: 
1
 | 
			| RE: One sound file needed twice at the same time. 
 
				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.
 |  |  
	| 10-13-2015, 06:19 PM |  |  |