TeamRizu / OutFox

The Bug Reporting Repository for OutFox LTS 0.4, Alpha V and Steam Early Access Builds
https://projectoutfox.com
Apache License 2.0
178 stars 3 forks source link

[Feature Request] Add a way to set the BPM/timing effectclock beat uses in lua #459

Open 48productions opened 2 years ago

48productions commented 2 years ago

Is your feature request related to a problem?

No

Describe the solution you'd like

For beat-based actor effects, it is to my understanding not possible to manually set the BPM/timing data that effectclock beat uses via lua. I'm requesting a way to make this possible.

As an example, effectclock beat will automatically sync actor effects to the beat of the currently playing song preview in ScreenSelectMusic. Similar functionality cannot be replicated on other screens, which might be wanted on, for example, a totally custom, lua-based select music screen (currently, effectclock beat would only sync to the custom screen's menu music in this case, to my understanding).

Describe alternatives you've considered

No response

Additional context

(Relevant conversation and Jose_Varela's proposed solution on the Outfox discord)

JoseVarelaP commented 2 years ago

For now, there's a new function inside the Song object that will perform the same operation called PlayPreviewMusic(). It'll send the song object to the soundmanager with all of its sync data so actors that have timing effects set can react to it.

local song = [your song object here]
song:PlayPreviewMusic()
48productions commented 2 years ago

Even if it's just a temporary/to be expanded on later thing, the idea behind this new function works for what I wanted to use it for, so I'll take it!

I think I've mentioned it in the Discord before a bit ago, but worth reiterating (especially now that I've tested/re-confirmed it on the 4.12 release), I've noticed a few things through testing it out:

(log.txt, if needed)

But other than that, it seems like this new function is working well!