Topic: How to use play_sound?
kaputtnik Topic Opener |
Posted at: Yesterday 18:00
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: Yesterday 20:51
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: Today 09:50
"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: Today 09:57
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: Today 09:59
Top Quote |
kaputtnik Topic Opener |
Posted at: Today 10:16
Thanks Top Quote |