while messing about with the mg42's included in mp_carentan i was able to play a sound through them and then after more trial and error i was able to spawn() a script_model that plays a sound.
will report back, to complete this thread.
EDIT:
alright, so after days of testing my conclusion is that i can't get "script_origin" to play a sound in COD1-1.4 - i.e. this doesn't work:
PHP Code:
org = spawn("script_origin", somePosition);
wait someTime1;
org playSound(someSound); // even if the playSound() is in a separate thread long time after the spawn()...
wait someTime2;
...
i've tried everything including different sounds, sounds aliases, wait timings, setting explicit .angles, .origin and so on.
maybe there is a way, but who knows.
"script_model" on the other hand does work as expected and there is no need to setModel(), set .angles, etc. something in the lines of this in your spawnPlayer() in tdm.gsc should do it:
PHP Code:
org = spawn("script_model", somePosition);
wait someTime1;
org playSound(someSound); // make sure that someTime1 is enough!
wait someTime2;
the downside of course, is that "script_model" is a heavier struct than "script_origin".
i still can't figure out exactly why it didn't work in my while() loop, but i think it has to do with timings and concurrency. if i maintain a single "script_model" per spawned player and only update the origin of said model on demand, it can playSound() every time at a specific location, which is pretty much what i was looking for.
thanks for the replies and suggestions.