Game Development Community

Shooting sound stopping

by Josiah Trumpower · in Torque Game Engine Advanced · 10/23/2009 (12:01 am) · 1 replies

When i fire my weapon the sound is cramped into about a 0.5 second sound when i want it to be about a 1-1.5 second sound. How do i change this?

#1
10/24/2009 (7:13 am)
the easy way is to alter the stateTimeout, but that only works if you also only want to be able to shoot every 1-1.5 seconds. This happens because the source is set to play the sound only until the on fire function is done. If you want rapid firing and for your sound to continue playing then check out the code at the bottom of this post.

www.garagegames.com/community/forums/viewthread/90269

Make sure you do what Gerald and Alex put or you will have memory leaks.