Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
in game music again... #137767
06/24/07 05:52
06/24/07 05:52
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
ok, i placed in game music on each level via scripting, very easy. each level runs the music flawlessly when you run each level. but why does the music from the first level play on all levels when you level change? i understand the first level is the main level thing, and it runs everything rule. but is there a way around it? i considered doing a random music code thing, but when i am on the stealth mission levels, and i need the music a little more subtle, some fast breakbeats might start playing. any suggestions?

Re: in game music again... [Re: Blink] #137768
06/24/07 08:50
06/24/07 08:50
Joined: May 2003
Posts: 567
Spain, Canary Islands
Felixsg Offline
User
Felixsg  Offline
User

Joined: May 2003
Posts: 567
Spain, Canary Islands
You can't stop the music before enter in the level 2?
I don't know to much and I don't know ii is possible but is only a suggestion

Re: in game music again... [Re: Felixsg] #137769
06/24/07 12:12
06/24/07 12:12
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
can't you just stop this music with function? depends of starting function?
like:
media_stop(var handle);
snd_stop (handle);

or before loading next level use:
snd_stopall(mode);


Never say never.
Re: in game music again... [Re: tompo] #137770
06/24/07 14:27
06/24/07 14:27
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
see, i am not sure how to do that. its a level load script, so i am not sure where to put a function like that, and because i am using templates, i am not sure where to add a code like this in the main of a template level.

Re: in game music again... [Re: Blink] #137771
07/02/07 13:01
07/02/07 13:01
Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
sPlKe Offline
Expert
sPlKe  Offline
Expert

Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
use handles.

activate and stop the music with a special handle. an example youll find in the manual.

var musichandle; //example

musichandle = snd_loop ("whatever.wav, null, 100);
musichandle = snd_stop ("whatever.wav");

of course this is just an example. you have to use the commands you need like media_play or whatever...

but this should help you out...

Re: in game music again... [Re: sPlKe] #137772
07/02/07 20:07
07/02/07 20:07
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
can you post another example of how you would do that? another piece of code?

Re: in game music again... [Re: Blink] #137773
07/02/07 21:21
07/02/07 21:21
Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
sPlKe Offline
Expert
sPlKe  Offline
Expert

Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
var snd_title;

sound BGM_Menu = <song_menu.wav>;

snd_title = snd_play(BGM_menu, 100, 0);
snd_stop (snd_title);

Re: in game music again... [Re: sPlKe] #137774
07/02/07 21:47
07/02/07 21:47
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
ok, so i put this in each main of every level and add that levels own music. and whjat will happen is, when a new level loads the music will stop from that level and the music from the next level will play?


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: in game music again... [Re: Blink] #137775
07/03/07 10:43
07/03/07 10:43
Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
sPlKe Offline
Expert
sPlKe  Offline
Expert

Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
basically.
each music needs its own handle. and when you load the enxt level, you have to stop the CURRENT music and the ones of all levels prior. because of loading, and new game and stuff...

and THEN you can start your new music

Re: in game music again... [Re: sPlKe] #137776
07/03/07 19:17
07/03/07 19:17
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
thanks, i dont quite understand, so the way you wrote the code, thats how it should look in the script? one command to start, then one to stop?


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Page 1 of 2 1 2

Moderated by  HeelX, rvL_eXile 

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