Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / PauseMusic() - Not Working Properly?

Author
Message
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 18th Sep 2020 03:19 Edited at: 18th Sep 2020 03:30
Hi,

We switched to MP3 for music and WAV for sound effects for HTML5 version now.
We have a problem with "PauseMusic()" not working?
When we do "PauseMusic()" the music pauses for 2 seconds and then continues playing?
Any idea what the issue is?

Thanks in advance...

Jesse

Game is currently closed source, but we can show small code below:
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 18th Sep 2020 05:29 Edited at: 18th Sep 2020 05:35
GamePaused = 50

... Is being set whether the GamePausedStatus is TRUE or FALSE

Could that be causing a problem in one of the other functions ?

Can't tell if you are changing that somewhere else, but found it odd that it would need to be set to the same value for a TRUE and FALSE

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Lupo4mica37
3
Years of Service
User Offline
Joined: 1st Jun 2020
Location:
Posted: 18th Sep 2020 12:48
Can you please explain what is the desired effect of:

GamePausedStatus = FALSE & GamePausedStatus = TRUE

What does the variable GamePaused control?

????????
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 18th Sep 2020 12:54
Quote: "Can you please explain what is the desired effect of:

GamePausedStatus = FALSE & GamePausedStatus = TRUE"

It looks like just a toggle boolean for using the switch to go on and off.

It was having the same value for the other variable that seemed a bit out of place for me, but hard to figure without knowing what that is for and how it is being adjusted elsewhere.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Lupo4mica37
3
Years of Service
User Offline
Joined: 1st Jun 2020
Location:
Posted: 18th Sep 2020 19:00 Edited at: 19th Sep 2020 00:13
Yep. I reason that the GamePaused variable might have something to do with that. I would suggest changing the condition of the elseif statement to something impossible, meaning:

elseif (GamePausedStatus = TRUE) and ElvisPresley = 77

Making sure you define ElvisPresley = 0 or something, just to check whether the second if statement is responsible for the resume of the Music. In the case it does not resume, then it would appear the problem will be with GamePaused = -1 condition, cause when you pause the music in the first if statement it sets the GamePausedStatus = TRUE which would activate the 2nd if statement, only GamePaused = -1 can stop it from executing, which might the actual problem, cause as you say it takes 2 seconds to resume, so something to do with time and delay.
????????

Login to post a reply

Server time is: 2024-04-19 10:59:36
Your offset time is: 2024-04-19 10:59:36