playMaker

Author Topic: Help with FSM structure[SOLVED]  (Read 1209 times)

Dijon

  • Playmaker Newbie
  • *
  • Posts: 12
Help with FSM structure[SOLVED]
« on: November 23, 2018, 10:42:02 AM »
I'm still in the early stages of design, and there's a few things I'd like to be clearer on before I start.

I see references to subFSMs, but it's not clear (to me, at least) how to create them. Are they more efficient than simply adding multiple FSMs to a game object? I've seen requests to incorporate block comments to more easily organize an FSM, but I can't tell if it has ever been implemented.

Secondly, aside from custom actions and the SendMessage action, is there any way to more tightly integrate C# code? Thanks.
« Last Edit: November 26, 2018, 01:59:15 AM by jeanfabre »

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Help with FSM structure
« Reply #1 on: November 23, 2018, 09:50:41 PM »
FSMs are scripts and it’s normal to have scores of them. I think my character has a dozen alone. But it would also have a dozen scripts if I used that method. No worries there.

The best way to integrate scripts and FSMs is via custom scripts. You can simply write own actions that can contain your script, or interact directly with other scripts as you’d do from script to script. Using some basic get component code and you can e.g. easily transfer variables around, start methods etc. Should be easy when you can code, if you’re a total newbie like I was (and still am, somewhat), you can find Mdotstrange’s tutorials on custom actions here in the forum and youtube.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Help with FSM structure
« Reply #2 on: November 24, 2018, 03:18:23 AM »
Hi.
You can have a look to the api :

https://hutonggames.fogbugz.com/default.asp?W127

There are some samples on how to communicate from/to scripts.

Dijon

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Help with FSM structure
« Reply #3 on: November 24, 2018, 07:53:23 PM »
Thank you, both; things are much clearer now. I love this community  :)