Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Dico), 16,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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