Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Multiple looping points

A topic by Robro33 created Apr 30, 2023 Views: 472 Replies: 2
Viewing posts 1 to 3
(1 edit)

Is it possible to have a song with multiple loops for different points mid battle with this plugin? i have a fight with 3 different phases and a track that id wish to be able to loop between certain points depending on the phase the player is in.

Something like "Dancing Mad" during the final kefka fight in Final Fantasy 6. The song and the fight both has 4 distinct phases. However, each phase of the song loops until the player clears that phase of the fight. Then the next time the song hits the loop point while in the following battle phase, the song transitions to the next part. 

Right now, i had just broken it up into 3 parts and had each play at the start of each phase but I dont like how abrupt it is on the phase transitions. I figured that with the plugin, id be able to preload the song twice (one with the second loop data and the other with the third loop data), play the song with the first loop through the default engine, then as the fight goes to phase 2, start the first preload of the song and have it pick up at the exact same place since it is the same song (but with phase 2 loop info) so that once it enters the new loop section it does the p2 loop, and then the same for phase 3 when it happens. is this something that the plugin would be able to do?

Developer (2 edits)

Yup!  What you describe ought to work just fine. Heck, you don't even need to do multiple preloads if all are the same music file; each time you play, you can just use the same preload but define different loop parameters in the PlayBGM command.

In the example video, that's the trick I use in the Cymore part of the video, though there it's not in battle. When you first enter the little graveyard area on the east side, it plays a short loop of the song's intro that will last until you leave. Once you head west into the main town, the loop parameters change and the full track is allowed to play.

EDIT: Okay, looking back at the example video, it's not that clear that I did that. I had another example video that made it more clear: 

i see... thats absolutely perfect then!