Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RMVX Question]Is it possible to have a song play only once?

Is it possible to have a song play only once? I guess there can be some weird parallel event timing or something but I dunno if there is a cleaner way to do it.

[EDIT]

I also have one other question. In windowed mode, if you click out of the box, it continues to play the song. Is there anyway to disable this?

Thanks a ton!
 
Do you mean in the RMXP editor? Thats just something RMXP does, can't really disable it. Just have to click Stop when your done.

If thats not what you meant, please be more specific


;)
Action
 
I think he means when you are playing a game and you click out of the game's window the game pauses but not the music. Although I dunno how to fix that. I imagine some script could do that.
 
Unfortunately that's one of those issues that would require rewriting the entire Audio module. I'm not entirely sure if a script has been released for that, but you could try a search. Otherwise, the only solutions would be to enable fullscreen or include a disclaimer telling players not to click outside the window.
 
The problem might be the audio module used for music playback, not a script itself. I imagine the audio module used (which I have no idea what is being used there) just plays regardless of window activeness, and that intentionally. I think you can't necessarily fix this by scripting.

What I can only try to disengage you from is the disclaimer idea... that's along the lines of 'This webpage is optimized for Browser XYZ', or 'please do not cross the Berlin wall perimeter' - people will read it, people will be aware of it, people will do it nevertheless (intentional or not), and people will - rightfully - blame you if the audio doesn't match, they don't see shit on your webpage, or they get shot by the guards. Don't shoot people - work with the engine, instead of circumventing it!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top