playMaker

Author Topic: [SOLVED]How to make a event always be trigger after a few seconds?  (Read 2183 times)

alexlange

  • Playmaker Newbie
  • *
  • Posts: 16
Hi

I'm trying to build a state to clean up my data, so put its event in the listener and make it wait seconds.
But in fact after other events in the listener state triggered, this clean up WAIT will be reset, that means in bad situation, it may never works.
So how can I make it works like a coroutine?

Thank you!

*I think maybe another FSM component(layer) to deal with it is one way out, but since there're lots of FSM instances here, that may not so good to make all my data Global.
« Last Edit: October 31, 2013, 02:36:20 AM by alexlange »

alexlange

  • Playmaker Newbie
  • *
  • Posts: 16
Re: How to make a event always be trigger after a few seconds?
« Reply #1 on: October 31, 2013, 02:35:24 AM »
Ah, I solve it.

1. Create another FSM component
2. Do clean up in FSM_2 by using "Set FSM [TYPE]"
3. Make a loop, done :)

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: [SOLVED]How to make a event always be trigger after a few seconds?
« Reply #2 on: November 02, 2013, 01:07:25 PM »
there is also a reset variable custom action as well, somewhere. ButI think you got it right anyway
Visit my portfolio: http://www.yanivcahoua.com/