Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Gun sound when click mouse...

Author
Message
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 10th Mar 2005 22:48
Im creating a FPS and ive got a gun shot sound and when i click the mouse button to fire the sound plays but if i click again..the sound doesnt play. Any ideas on making this work. My code is below!

Thanks

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 11th Mar 2005 05:36
Use the Sound commands instead of the Music commands.

"Droids don't rip your arms off when they lose." -H. Solo

REALITY II
dazzling dazzla
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: here
Posted: 13th Mar 2005 00:10
try resetting the position from where the music plays from ie:

play music 1,start position,end position

the answer to all lives questions is...
... meh!
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 13th Mar 2005 04:55
You want load sound and play sound.
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 13th Mar 2005 05:18
chris k:

Do i need them next to each other then, cos the load sound is near the top of my coding?

Thanks

Medusa
21
Years of Service
User Offline
Joined: 7th Sep 2003
Location:
Posted: 14th Mar 2005 06:22
You load all your sounds, images etc. before going into your main program DO LOOP.
In the loop you can use PLAY SOUND within your condition as long as the condition does not allow the sound to play repeatedly as the program goes through the loop.
Also if you do not put in a means of resetting your bulletlife back to zero the next time you press the mouse it will check the condition and refuse to play the sound.
Try to think in algorithms and not in code and follow it through step by step.

mpc

Login to post a reply

Server time is: 2024-11-13 19:49:15
Your offset time is: 2024-11-13 19:49:15