Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Rickytv on January 16, 2019, 05:58:07 PM

Title: Having something either wait or complete [SOLVED]
Post by: Rickytv on January 16, 2019, 05:58:07 PM
I am kind of stuck in a way that I want something to stay on the state as long as a button is held but if it's not held still wait the amount of time. On the state is an interpolate action that I want to play still for a few seconds if the button is not held but do not know how to approach this spoken situation and I am in an utter predicament. any help is well thanked  :). What I am looking is possibly an alternative to an "or" statement or something. or a way to have the "wait" action in said state trigger a boolean while with other actions running in one state.
Title: Re: Having something either wait or complete
Post by: djaydino on January 16, 2019, 10:59:02 PM
hi.
1st think that comes in my mind is the have the interpolate in a separate fsm

and on the main fsm when button released go to next state, have a wait.
Then after wait, send event to the fsm with the interpolate to stop the interpolate.

Here is a video on events / global events

Title: Re: Having something either wait or complete [SOLVED]
Post by: Rickytv on January 17, 2019, 11:23:11 AM
Thank you very much, I used a wait inside an fsm template which had a wait and a set bool value which if the held button was false and the finished wait was done and sent a false, would go to next event.