Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by jcl. 02/12/26 14:05
MarginCost discrepancy?
by jcl. 02/12/26 14:02
Hedge on FXCM, 4 or 5?
by qin. 02/11/26 14:12
CMC MT4 CFD vs FX Active - what's better?
by mayarik. 02/11/26 11:00
print a "still alive" log
by qin. 02/10/26 12:16
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 7,787 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon, mayarik
19198 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 | 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