playMaker

Author Topic: Linear action flow in state  (Read 3029 times)

sushitommy

  • Playmaker Newbie
  • *
  • Posts: 1
Linear action flow in state
« on: September 17, 2013, 08:15:36 AM »
For a project I needed a linear flow of action calls, instead of all my custom actions being called directly when the state is entered.

I created a new class called FsmStateLinearAction which is an extension of FsmStateAction. This is how it works: The Linear Action is called just like every Action in Playmaker. However, the linear action waits for a specific OnCall event to run. The first linear action in the state does run on OnEnter, and calls the CallNext event to finish the current and activate the next linear action. This way you can chain actions in a state and run them subsequently.

I'm curious of what you think of this idea!   ::)

Cheers,

Tom

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Linear action flow in state
« Reply #1 on: September 17, 2013, 10:11:53 AM »
Interesting approach! I'll check it out...

Note, in 1.7.4 there's a new option to run actions as a sequence. In the state menu, check Action Sequence.