|
|
|
5 registered members (alx, TipmyPip, Martin_HH, Enayn, 1 invisible),
5,158
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Walking with sounds please help!!!
[Re: MrGuest]
#251509
02/13/09 12:57
02/13/09 12:57
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Always use a global pointer for the sound "handle", and where your code wants to play have this //global handles
SOUND* footsteps1 = "footsteps.wav";
var Snd_Channel_1;
function Inside_Any_Function_or_Action()
{
...
//only START playing if already finished
if(snd_playing(Snd_Channel_1)==0) Snd_Channel_1 = snd_play(footsteps1, 100, 0);
...
}PS. you can have up to 32 Channels according to the manual.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|
|
|
|