Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: hoyoyo80 on August 25, 2020, 02:19:40 AM

Title: Reusing FSM like component/script
Post by: hoyoyo80 on August 25, 2020, 02:19:40 AM
Hi all,

Let say im creating some basic mechanics like movement and jump in PM and later i want to use these FSMs to prototype other game quickly by simply adding it like script/component to the new object.How can i achieve this?

Thanks
Title: Re: Reusing FSM like component/script
Post by: Marc Saubion on August 25, 2020, 03:41:13 AM
You can save your FSMs as templates and reuse them like scripts.

Templates can also be used as sub FSMs with the "run FSM" action. I recommend using the run FSM func action (https://hutonggames.com/playmakerforum/index.php?topic=18762.0) that allows for variables communication both ways so you can work with nested FSMs like prefabs.
Title: Re: Reusing FSM like component/script
Post by: hoyoyo80 on August 25, 2020, 04:07:30 AM
Ok..so that solved it:) Thanks a lot.

EDIT: i have dig into Run FSM yet and how it is useful in a project. I imagine it like a generic function that all prefabs can use?