Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: artician on October 27, 2012, 01:09:39 PM

Title: Can I use a state boolean like this?
Post by: artician on October 27, 2012, 01:09:39 PM
Sorry for the subject but I didn't know what to title this.

In the below screenshot I'm showing a single state in my FSM.  I was hoping this would actually work.  Here's what I'd like it to do:

Check if the PlayerPref exists, if yes, go to Finished
if no, continue on in the state
continuing on in the state sets the PlayerPrefs default data, and then Finishes as normal.

(http://www.creathcarter.com/site_media/unity/prefs.jpg)

Will the state function as I expect?  Or is there a chance it will process the Set PlayerPrefs actions before Finishing?

Thanks!
Title: Re: Can I use a state boolean like this?
Post by: jeanfabre on October 29, 2012, 01:30:16 AM
Hi,

 and what's your findings? does it actually work? I would say yes.

 If you trigger an event that is within fsm, it will exit the state without processing following actions. Actions are processed in order starting from the top.

For clarity I would create a "KEY EXISTS" event and use that instead of "FINISHED". and have both transitions actually.

bye,

 Jean