PlaySound is global, and PlayLocalSound is only for players you defined (e.g, self or attacker) I think
PlaySound is global, and PlayLocalSound is only for players you defined (e.g, self or attacker) I think
kung foo man (7th March 2013),pollo (6th March 2013)
But you could also do (if I am right) this:
Code:soundfunc() { trig = getent("trig_sound","targetname"); while(1) { trig waittill("trigger",player); player playsound("sound"); } }
So the sound is only played to the player... Don't know the difference between them, but thanks for the answer anyways
kung foo man (7th March 2013),pollo (8th March 2013)
PlaySound = Play sound at position/origin (everyone near it can hear).
PlayLocalSound = Play sound only for player
AmbientPlay = Play on the whole map (It bugs for new joining players, so would be better to use playLocalSound via for() loop)
No ... No ... this is not possible .......
Ahhh Understood already :]
I thought that the sound was played to the player but now I understand the difference^^
Thank you all!
Ambient? then use AmbientStop(fadeout time); to stop it
That doesnt work. I dont get any error, but the ambient just keeps playing.
Code:musicoff() { while(1) { if(getCvar("scr_music") == "1") { AmbientStop(0); AmbientStop("zom_scary"); } wait 1; } }
I stepped over a problem today: Stopping a sound works with playLocalSound, but not with playSound. This is annoying, as sounds might overlap in some scenarios. The soundalias was:
Removing the entity, which played the sound, did not help, neither did moving the entity away (the sound stays at the location where it has been played).Code:name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage test_local,,startsound.mp3,1,1,,,,1000000,,local,streamed,1 test_stop_local,,stopsound.mp3,1,1,,,,1000000,,local,streamed,1
Any known solutions? Playing the desired sound by a playLocalSound loop over all players it not nice, as the distance<->volume curve gets lost.
Maybe I just forgot something ^^