Page 1 of 1

Skip a private state

Posted: 21 December 2023, 22:46
by c12h22o11_
I'm trying to develop something that has a set of multiactive private states. Basically, i need the ability to add player actions *if necessary* before the main event, so i'm splitting it up as: preThing, thing, postThing, finalizeThing. My problem is that in most cases I dont *actually* need to do anything in pre/post and would like to skip these. Is is possible to have an equialent of a "game" private state or to skip a private state? I tried adding an "action" to my private state and the end result of that was a siutation in which I ended up going A C B instead of A B C.

Any solutions or examples of games that have done this would be appricated.

Re: Skip a private state

Posted: 22 December 2023, 09:37
by BaronFraser
Generally speaking, you put the logic in the end of the previous private state.

So the private state that calls PreThing resolves whether it needs to call preThing, thing, postThing or something entirely different.