Kromster80 / kam_remake

"KaM Remake" is an RTS game remake written in Delphi from scratch.

Home Page:http://www.kamremake.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scripting: adding the option to abruptly stop a WAV file

lolslayer opened this issue · comments

When playing a WAV file it's impossible to stop it abruptly.

I've got a map in the works where a battle song plays using Actions.PlayWAVFadeMusic() when the enemy is attacking. But the only function to stop music when the attack is over is: Actions.StopLoopedWAV(). This doesn't stop the song abruptly though, it will just make sure that when the song is over it won't loop again. This way the song might play long after the battle is over.

Is it possible to add a scripting function that will stop the WAV while it's playing?

Why not just create multiple wavs by spliting the song/music and playing them in order then stop them all at once via stoploopedwav?

Edit: Even if this gets added don't count on new build soon since there wasn't any in meanwhile

I thought of that already in the past, but it will take some time to split the songs in multiple files and play them exactly after eachother (which may even create small stops between the splits). Hard-coding all the files in will also take time to do and even if you got it all working perfectly, it still isn't completely perfect.

While a function that just abruptly stops a WAV file from playing works perfectly fine and makes it much easier to make something like custom music at certain intervals.

Stopping playing WAV is a good idea )

Indeed but would be nice if it got included in some release since there wasn't any Krom for a long time

When was last version compiled?

commented

AFAIK there must be a big change set before a new release will be published.
On the website:
Latest release: KaM Remake r6720 (10/12/2014)

"Stopping playing WAV is a good idea )"

Thanks :)

commented

Added StopSound procedure at my repo