Inside3D!
     

Looping sound > start then stop

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Mon May 24, 2010 1:40 pm    Post subject: Looping sound > start then stop Reply with quote

Is it possible to start a looping sound, then stop it?
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Mon May 24, 2010 2:07 pm    Post subject: Reply with quote

Create an entity that will start by playing .noise1 until triggered, then switch between .noise1 and .noise2 whenever triggered. Then make .noise1 be the looping sound, and .noise2 be a sound that isn't looping.
_________________
<ekiM> Son, you're writing data structures your CPU can't cache.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Mon May 24, 2010 2:56 pm    Post subject: Reply with quote

and from a QC perspective:
a sound is replaced if you play another sound on the same entity+channel (except not channel 0).
this is true whether the old sound was looping or not.
so you can stop a sound by playing a null sound.
note that this is similar to the sounds made by moving trains (except that the replacement sound is not silent in that case).

with qw engines, be careful about phs (replacement sound should have no attenuation)...
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Mon May 24, 2010 4:54 pm    Post subject: Reply with quote

Cheers for that, got it working using the null.wav.
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Tue May 25, 2010 8:20 am    Post subject: Reply with quote

There is a map hack that can do this if you're not modifying code.
_________________
<ekiM> Son, you're writing data structures your CPU can't cache.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group