playMaker

Author Topic: Enable FSM on all children[SOLVED]  (Read 2228 times)

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Enable FSM on all children[SOLVED]
« 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

Nick
« Last Edit: February 13, 2017, 02:36:06 AM by jeanfabre »

elusiven

  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
Re: Enable FSM on all children
« Reply #1 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.

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Enable FSM on all children
« Reply #2 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

elusiven

  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
Re: Enable FSM on all children
« Reply #3 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.

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Enable FSM on all children
« Reply #4 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.