Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Volume help please  (Read 4190 times)

0 Members and 1 Guest are viewing this topic.

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Volume help please
« on: November 08, 2011, 02:57:40 PM »

Hey,

I'm really having some trouble figuring out a volume issue - I want to increase and decrease the volume of music at certain points in the game - I'm setting the globalmusicvolume - but this is causing problems since it puts it in the registry - basically if I set it to 100 at a certain point in the game, then save the game, then reload an old savegame where the volume needs to be 55, then because it's a registry value, the volume becomes 100, rather than 55.

Any ideas how to overcome this to ensure the volume is correct at all time? I'm all out of ideas.  :(
Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Volume help please
« Reply #1 on: November 12, 2011, 09:52:57 AM »

Isn't it possible to have a global variable like globalMusicVolume and read its value every time you load to set the volume? Something like:

Code: WME Script
  1. on "load"
  2. {
  3.   if(SelectedSlot >= 0) Game.LoadGame(SelectedSlot);
  4.   Game.SetMusicVolume(globalMusicVolume );
  5. }
  6.  
Logged

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Volume help please
« Reply #2 on: November 22, 2011, 09:18:26 PM »

Thanks for the reply - I think I can use a separate registry value to solve the issue.  :)
Logged
 

Page created in 0.031 seconds with 20 queries.