Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Ayumi), 662 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Walking with sounds please help!!! #251456
02/13/09 08:00
02/13/09 08:00
Joined: Jan 2009
Posts: 36
Philippines
U
unknown_master Offline OP
Newbie
unknown_master  Offline OP
Newbie
U

Joined: Jan 2009
Posts: 36
Philippines
i include my sounds in my code named "footsteps.wav",, when i press "w" the sounds will play...but when i stop pressing "w" the sound didnt stop anymore...do i use snd_play or snd_loop while pressing "w"?? and from no press snd_stop?? sometimes the sound duplicates when i double press the "w" button...what will i suppose to do?? please help me!! tnx!!

Re: Walking with sounds please help!!! [Re: unknown_master] #251492
02/13/09 10:29
02/13/09 10:29
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
hey, just use snd_play, have each footstep in seperate wavs for different floor types, then call the wav when the animation has it's foot on the floor.

hope this helps

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 Offline
Expert
EvilSOB  Offline
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
Code:
//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
Re: Walking with sounds please help!!! [Re: EvilSOB] #251579
02/13/09 20:54
02/13/09 20:54
Joined: Nov 2008
Posts: 29
Philippines
ZeroEight Offline
Newbie
ZeroEight  Offline
Newbie

Joined: Nov 2008
Posts: 29
Philippines
well,this sure helps me a lot.thank very much sir..

Re: Walking with sounds please help!!! [Re: ZeroEight] #252029
02/16/09 02:40
02/16/09 02:40
Joined: Jan 2009
Posts: 36
Philippines
U
unknown_master Offline OP
Newbie
unknown_master  Offline OP
Newbie
U

Joined: Jan 2009
Posts: 36
Philippines
tnx a lot sir...i hope it will help in our project...^_^


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1