Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: coxy17 on February 10, 2017, 06:45:27 AM

Title: Enable FSM on all children[SOLVED]
Post by: coxy17 on February 10, 2017, 06:45:27 AM
Hi

I am using the EnableFSM in the playmaker actions to enable/disable based on manually targeting a FSM. Is there a way to do this for all child objects of the parent too?

https://hutonggames.fogbugz.com/default.asp?W55 (https://hutonggames.fogbugz.com/default.asp?W55)

Nick
Title: Re: Enable FSM on all children
Post by: elusiven on February 10, 2017, 08:12:06 AM
Use Get Child Next, and in a loop state just do Set Property or EnableFSM on the FSM component of loop game object. That will enable or disable the FSM on all child objects of a x parent object.
Title: Re: Enable FSM on all children
Post by: coxy17 on February 10, 2017, 09:07:41 AM
Hi

Thanks didnt see that obvious option haha, was thinking i would have to script it up. Am i guessing right in saying that if one of the child objects has a 2nd FSM it wouldnt detect it?

Nick
Title: Re: Enable FSM on all children
Post by: elusiven on February 10, 2017, 09:18:04 AM
I didn't test it, but I would assume that yes you are correct. Although this is possible, you would have to modify the action or add a new one.
Title: Re: Enable FSM on all children
Post by: coxy17 on February 12, 2017, 06:23:14 PM
ok i could never find a script on the Ecosystem so now I have adapted the script and it works great now.