Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Same music in some scenes  (Read 2621 times)

0 Members and 1 Guest are viewing this topic.

TomGamer

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
    • View Profile
    • http://tomgamer.com
Same music in some scenes
« on: October 24, 2015, 08:41:09 PM »

Hello! :)

I want to play same music (looping) in some scenec.

From outside scene i go to Room1
Room1,Room2,Room3 = same music.
I want go through this rooms without changing position on music track.

From Room3 i go to Floor1Room1
Floor1Room1,Floor1Room2,Floor1Room3 = different music.
Play music as above.

It is possible to set music for some rooms without cuting (start again music) loop?

Thanks for help!
Logged
http://tomgamer.com - I love games!
http://gamingcats.com - We love games!

TomGamer

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
    • View Profile
    • http://tomgamer.com
Re: Same music in some scenes
« Reply #1 on: October 25, 2015, 12:40:39 PM »

No1 know? :(
Logged
http://tomgamer.com - I love games!
http://gamingcats.com - We love games!

NAItReIN

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 68
    • View Profile
Re: Same music in some scenes
« Reply #2 on: October 25, 2015, 01:27:37 PM »

Take a look at Music support in WME:
http://docs.dead-code.org/wme/inside_music.html

Logged

TomGamer

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
    • View Profile
    • http://tomgamer.com
Re: Same music in some scenes
« Reply #3 on: October 25, 2015, 01:43:32 PM »

THX for reply man, ofc i already read it before but it is not solution of my problem...

Anyway thanks.
Logged
http://tomgamer.com - I love games!
http://gamingcats.com - We love games!

NAItReIN

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 68
    • View Profile
Re: Same music in some scenes
« Reply #4 on: October 25, 2015, 01:46:46 PM »

Quote
THX for reply man
You're welcome.

Quote
....it is not solution of my problem...
I will try to find solution for you. I believe there is a way how to achieve what you want.
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Same music in some scenes
« Reply #5 on: October 26, 2015, 10:37:33 AM »

Game.PlayMusic() should play the music through all different scenes without stopping.
Logged

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Same music in some scenes
« Reply #6 on: October 26, 2015, 07:15:26 PM »

Just check for the music that is playing, something like that should work:

Code: WME Script
  1. if (Game.IsMusicPlaying() && Game.GetMusic() != "music\Room.ogg")    //There is a music playing but is not the right one
  2.         {
  3.         //This crossfade the two musics, so one fade out and the other fade in
  4.         Game.PlayMusicChannel(1, "music\OtherMusic.ogg", true);
  5.         Game.SetMusicChannelVolume(1, 0);
  6.         Game.MusicCrossfade(0, 1, 1500);
  7.         }
  8. else if (!Game.IsMusicPlaying()) Game.PlayMusic("music\Room.ogg", true);    //There is no music playing
  9.  

Logged

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Same music in some scenes
« Reply #7 on: October 26, 2015, 07:20:02 PM »

Obviusly if the right music is already playing it won't be stopped.
Logged

TomGamer

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
    • View Profile
    • http://tomgamer.com
Re: Same music in some scenes
« Reply #8 on: October 26, 2015, 09:27:48 PM »

Sir, thanks so much for answer! I will check your solution soon as possible!!

Very thanks!!!
Logged
http://tomgamer.com - I love games!
http://gamingcats.com - We love games!
 

Page created in 0.072 seconds with 25 queries.