Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Ony on October 09, 2014, 09:42:24 PM

Title: How to access child object after using "nGUI Tools Add Child"?
Post by: Ony on October 09, 2014, 09:42:24 PM
I'm new with Playmaker and nGUI and still trying to wrap my brain around certain concepts, so forgive me if the answer to this is obvious. :)

I am using the nGUI Tools Add Child action to add spell slots (with FSMs of their own) into an nGUI grid. The grid contains the FSM with the action that adds the children.

I've got that working just fine, but I'm not sure how to access one of the child objects once it's been added, so I can do more stuff to it in the same action list that added it.

Is there a pointer variable to the child game object some where I'm missing?

Thanks!
Title: Re: How to access child object after using "nGUI Tools Add Child"?
Post by: jeanfabre on December 02, 2014, 11:07:16 AM
Hi,

 It depends your search criterias, typically, in all cases I would suggest the following:

 maintain using ArrayMaker (https://hutonggames.fogbugz.com/default.asp?W715) the list of spells, and directly save the ngui gameobject responsible for showing as an item in the ngui list, then you don't need to search the ngui list, indeed you search your own list, whicih is going to be much better in the long run.

 Bye,

 Jean