Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, ChrstphFr), 941 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Music in background #267081
05/21/09 19:32
05/21/09 19:32
Joined: Jan 2004
Posts: 20
G
gumby Offline OP
Newbie
gumby  Offline OP
Newbie
G

Joined: Jan 2004
Posts: 20
Hi,
I actually have a game pretty much done but have a few questions. What do I type and where do I type it to make a .wav file loop throughout the game?

I tried a few things and got script errors.

Thanks for the help

Re: Music in background [Re: gumby] #267082
05/21/09 19:37
05/21/09 19:37
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
SOUND* whamm = "whamm.wav";
var whamm_handle;
...
whamm_handle = snd_loop(whamm, 100, 0);

from manual..

Last edited by Jaxas; 05/21/09 19:37.

The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)
Re: Music in background [Re: Jaxas] #267226
05/22/09 16:30
05/22/09 16:30
Joined: Jan 2004
Posts: 20
G
gumby Offline OP
Newbie
gumby  Offline OP
Newbie
G

Joined: Jan 2004
Posts: 20
Thanks,
I found that in the manual.
Guess I don't know where to put it. I tried adding it to the main script in lots of different places and I made a separate script and included it.
Nothing's working.

Where does it go?

Re: Music in background [Re: gumby] #267229
05/22/09 16:52
05/22/09 16:52
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
SOUND* whamm = "whamm.wav";
var whamm_handle;

These bits are definitions of the actual Sound file, and a variable which allows you to control the sound (pause, stop etc). These can be defined globally, which means anywhere outside a function/action. Its best to have them at the top of your script, or even in a seperate script if you want.

The last bit,whamm_handle = snd_loop(whamm, 100, 0);, should be called inside a function or action.


Last edited by DJBMASTER; 05/22/09 16:53.

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