| Commands->Monitor_Sound [message #470434] | 
			Sun, 01 July 2012 12:13   | 
		 
		
			
				
				
				
					
						  
						Troll King
						 Messages: 56 Registered: June 2012  Location: Netherlands
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		Well title n stuff explains it. Would be cool if TT would fix it making it work in SSGM/Multiplay? Dunno if this is the right place to put this topic. So this would actually be sent to the object: CUSTOM_EVENT_SOUND_ENDED. 
 
I assume this is the right way to do it: 
 
int SoundID = Commands->Create_2D_WAV_Sound("grunt_grunt.wav"); 
Commands->Monitor_Sound(obj, SoundID); 
(obj = script owner) 
 
and then in Custom event do something on CUSTOM_EVENT_SOUND_ENDED. 
 
But it doesnt seem to trigger the Custom nor the Action_Complete any time.
		
		
  Also Known As: Neijwiert
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 | 
	| 
		
 | 
	| 
		
 | 
	| 
		
 | 
	| 
		
 | 
	
		
		
			| Re: Commands->Monitor_Sound [message #470738 is a reply to message #470434] | 
			Wed, 04 July 2012 14:05    | 
		 
		
			
				
				
				
					
						  
						Troll King
						 Messages: 56 Registered: June 2012  Location: Netherlands
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		Hehe to report to you I'm CERTAIN that it needs an ID becouse I'm currently decompiling several Westwood scripts and they use the Commands->Monitor_Sound aswell. they take that int that comes from creating the sound. Then they wait for the custom CUSTOM_EVENT_SOUND_ENDED. but that does not appear to work in mp
		
		
  Also Known As: Neijwiert
		
 |  
	| 
		
	 | 
 
 
 | 
	
		
		
			| Re: Commands->Monitor_Sound [message #470746 is a reply to message #470434] | 
			Wed, 04 July 2012 17:27    | 
		 
		
			| 
				
	 | 
 
	
		The value you pass to Monitor_Sound needs to be a value returned from a command like Create_Sound or Create_2D_Sound. 
 
CUSTOM_EVENT_SOUND_ENDED is definatly the right way to listen for it. Note that if the sound loops, you do NOT get the message. 
		
		
  Jonathan Wilson aka Jonwil 
Creator and Lead Coder of the Custom scripts.dll 
Renegade Engine Guru 
Creator and Lead Coder of TT.DLL 
Official member of Tiberian Technologies 
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	
		
		
			| Re: Commands->Monitor_Sound [message #470763 is a reply to message #470434] | 
			Thu, 05 July 2012 03:19    | 
		 
		
			
				
				
				
					
						  
						Troll King
						 Messages: 56 Registered: June 2012  Location: Netherlands
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		Like I said I did all of the above, non-looping and it just will not send ANY custom. 
 
EDIT: I completly decompiled M00_BuildSound_Controller, does not work the way it should. 
 
EDIT2: Why doesn't "grunt_grunt.wav" work then? Or however that .wav was called. It isn't a looping sound.
		
		
  Also Known As: Neijwiert
		[Updated on: Thu, 05 July 2012 03:21] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	
		
		
			| Re: Commands->Monitor_Sound [message #470774 is a reply to message #470434] | 
			Thu, 05 July 2012 09:14   | 
		 
		
			
				
				
				
					
						  
						Troll King
						 Messages: 56 Registered: June 2012  Location: Netherlands
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		| Quote: |   Did try presets too, didnt work. Doesn't seem to work at all but it has been added to TODO for tt team to investigate Smile
  |   
		
		
  Also Known As: Neijwiert
		
 |  
	| 
		
	 | 
 
 
 |