XeroOl / notitg-mirin

The NotITG Mirin Template. Easily create modfiles using Lua.
https://xerool.github.io/notitg-mirin
The Unlicense
35 stars 16 forks source link

A way to defer funcs by a number of frames #43

Closed XeroOl closed 2 years ago

XeroOl commented 2 years ago

I added defer= to funcs, you can set defer=true to delay by a frame, or defer=n to delay by n frames

XeroOl commented 2 years ago

I still need to do this

XeroOl commented 2 years ago

The reason this hasn't happened yet is that it causes there to not be a canonical order to funcs. This messes up a ton of assumptions that are being made in the mirin template backend, so I need to think longer about how to make this work and also stay consistent.

ie,

func {0, function() print('a') end}
func {1, function() print('b') end, delay = 1} --
func {60, function() print('c') end}

Would print 'abc' if played from front to end, but acb if started after beat 60. I have no idea under what circumstances this is desired and under what circumstances it isn't.

ChocoboGamer commented 2 years ago

After consideration by Xero, this functionality would conflict with how func is currently setup in the template and would cause several sorting issues if implemented.