FSMgasm icon indicating copy to clipboard operation
FSMgasm copied to clipboard

Allow startInstant to be modified after the state started

Open SimplyMerlin opened this issue 5 years ago • 2 comments

Hey,

I've been looking for a way to change the duration of a state while it already started. Think of for example cubecraft's pregame timer going down to 10 seconds when a certain amount of people hava joined. Could this be implemented in anyway? I made a not so elegant solution for this problem in a fork simply by just making startInstant to be modified (which then allows you to change startInstant to Instant.now() and then set the Duration to whatever you want for a new countdown). I assume there are way better ways to implement this.

TL;DR allow resetting and modifying the duration of a state after it already started

thanks.

SimplyMerlin avatar Apr 18 '21 16:04 SimplyMerlin

The project is too old. I don't think I will personally change it.

Minikloon avatar Apr 19 '21 15:04 Minikloon

maybe he'll merge it if you make a pr

vhagedorn avatar Apr 29 '21 21:04 vhagedorn