Topic: How to use play_sound?
| kaputtnik   Topic Opener | Posted at:
        
            
    2024-12-11, 18:00 UTC+1.0 I am trying to use the play_sound function in a scenario, but somehow this does not work for me. I get always failures similar to: The soundfile "thunderstorm_00.ogg" is stored in  Regardless which pattern i use the file can not be found. The following i have tried: Which mistake i do?  Top  Quote | 
| hessenfarmer   | Posted at:
        
            
    2024-12-11, 20:51 UTC+1.0 I had a similar issue once before when trying to add images to scenariospecific units.     play_sound("campaigns/emp04.wmf/scripting/sounds/thunderstorm" or play_sound("maps/my_scenario.wmf/sounds/thunderstorm"  Top  Quote | 
| kaputtnik   Topic Opener | Posted at:
        
            
    2024-12-12, 09:50 UTC+1.0 
 "relative to the data folder" is relative  Ahh, i think i misunderstand "data folder" with the main data folder of widelands, but meant is the folder where maps and savegames are stored (.widelands)? 
 This works for me, but probably will not work for others. E.g. if the scenario is installed as an add-on (".widelands/addons/som/name/"" or if the map is stored in a different folder than   Top  Quote | 
| hessenfarmer   | Posted at:
        
            
    2024-12-12, 09:57 UTC+1.0 if you provide the map as a real addon you should use the addon file system. see https://github.com/widelands/widelands/issues/6490 this would make it probably save for everyone using the map  Top  Quote | 
| hessenfarmer   | Posted at:
        
            
    2024-12-12, 09:59 UTC+1.0 
  Top  Quote | 
| kaputtnik   Topic Opener | Posted at:
        
            
    2024-12-12, 10:16 UTC+1.0 
 Thanks   Top  Quote | 

 
         
		 
		 
		 
		
 
 