Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: greg on March 04, 2013, 01:38:14 PM

Title: check children
Post by: greg on March 04, 2013, 01:38:14 PM
Whats the simplest way to check if an object has a certain child object?
Couldn't figure out how to use "get next child" effectively..
Title: Re: check children
Post by: Vallar on March 04, 2013, 02:43:09 PM
I am not sure if this is what you are after:
There is an action in Playmaker called "Get Child" not "Get Next Child", you can feed it the parent (if the FSM is not attached to the parent) then on the second field there is the "Child Name", you can enter the name of the child you are after and you can even check for the tag if you want a certain tagged child from multiple ones and then you can store the result in an object variable created.

Hope that helps.
Title: Re: check children
Post by: greg on March 04, 2013, 03:58:50 PM
Thanks, maybe that will work.. i have several children: "door1", "door2", "door3"..etc, and was going to loop through each child checking its name against a string "door".. or even easier, if i could just loop through children trying to find one with a certain tag.. not sure how to go about it.