leezer3 / OpenBVE

OpenBVE- A free train simulator
http://www.openbve-project.net
278 stars 52 forks source link

[Request] Making a "numberOfActiveSounds" / "numberOfCurrentlyPlayingSounds" .animated variable #816

Open BPI-919 opened 2 years ago

BPI-919 commented 2 years ago

Description

Hi,

I have just thought a new .animated variable would be useful, at least for me like this:

numberOfCurrentlyPlayingSounds: It returns with the number of the currently playing (active) sounds

I don't know whether creating this variable with its proper operation, would be feasible?

Thanks, Andrew

leezer3 commented 2 years ago

That's easy enough, although I'm not sure it'll actually get you what you want- Any more details as to what you're trying to achieve? It's also system/ user config specific as to the max number of concurrent sounds.

If you look in the F10 debug info, this has the number of currently playing sounds. Let me know if this number is workable for you before I add something.