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
3 registered members (AndrewAMD, 7th_zorro, dr_panther), 1,297 guests, and 6 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
Background Music For Level #188754
03/16/08 12:50
03/16/08 12:50
Joined: Mar 2008
Posts: 23
J
jmasterx Offline OP
Newbie
jmasterx  Offline OP
Newbie
J

Joined: Mar 2008
Posts: 23
Hello,

I am using A7 Pro and i'm building an FPS using the shooter template, I was wondering how I can add background music (sort of like a media handle)to each level, a song that plays over and over, I dont want to "add sound" because that has a range which is no good for me (fades out randomly) I don't see a way to import a script either, not for bg music,

Thank you,

Re: Background Music For Level [Re: jmasterx] #188755
03/16/08 13:16
03/16/08 13:16
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Wrong forum to ask this type of question.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: Background Music For Level [Re: Nidhogg] #188756
03/16/08 14:24
03/16/08 14:24
Joined: Mar 2008
Posts: 23
J
jmasterx Offline OP
Newbie
jmasterx  Offline OP
Newbie
J

Joined: Mar 2008
Posts: 23
Hi,

where should I post it then?
could you give me a hint anyways?

Re: Background Music For Level [Re: jmasterx] #188757
03/16/08 16:08
03/16/08 16:08
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Try this:

Put this in your script before loading the levels:
Code:
SOUND* Level01Snd = "Level1.mp3";
SOUND* Level02Snd = "Level2.mp3";



And change your Level load function to this:
Code:

//Level 1
level_load("Level01.wmb");
snd_loop(Level01Snd, 100, 0);

//Level 2
level_load("Level02.wmb");
snd_loop(Level02Snd, 100, 0);


and so on


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Background Music For Level [Re: WretchedSid] #188758
03/16/08 19:54
03/16/08 19:54
Joined: Mar 2008
Posts: 23
J
jmasterx Offline OP
Newbie
jmasterx  Offline OP
Newbie
J

Joined: Mar 2008
Posts: 23
Hi,

it didn't work for me, I keep getting unknown keyword SOUND* and unknown parameter snd_play.....
It does however work in a new script.c file, (just a test one) is it because my script is .wdl instead of .c?

thanks

Re: Background Music For Level [Re: jmasterx] #188759
03/16/08 20:09
03/16/08 20:09
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Yes, that code snippet was for Lite-C (.c files) and not for C-Script (.wdl files).


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Background Music For Level [Re: WretchedSid] #188760
03/16/08 20:22
03/16/08 20:22
Joined: Mar 2008
Posts: 23
J
jmasterx Offline OP
Newbie
jmasterx  Offline OP
Newbie
J

Joined: Mar 2008
Posts: 23
ok how could I implement it as c script?
thanks

Re: Background Music For Level [Re: jmasterx] #188761
03/16/08 20:50
03/16/08 20:50
Joined: Mar 2008
Posts: 23
J
jmasterx Offline OP
Newbie
jmasterx  Offline OP
Newbie
J

Joined: Mar 2008
Posts: 23
nevermind, got it by doing this:

//Level 1
level_load(level_str);
var sTest;

sTest = snd_create("haunted1.wav");
// play the sound
snd_play(sTest,70,50);


thanks anyways


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