Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: escpodgames on February 02, 2013, 03:29:16 AM

Title: ArrayMaker - Get all gameobjects with Tag[SOLVED]
Post by: escpodgames on February 02, 2013, 03:29:16 AM
Hi,

I'm not sure if this has been created (I've looked and all I can find is get closest gameobject) but what I'm after is an action that will get all the gameobjects in a scene and create an array out of them. Basically when my level loads it will create an array of all the spawn points, as each level could have a different amout it would be great to do this on load and not manually add them each level.

Cheers
Andrew
Title: Re: ArrayMaker - Get all gameobjects with Tag
Post by: jeanfabre on February 02, 2013, 03:17:48 PM
Hi,

 I would take the opposite approach. Every object that wants to register itself as a spawning point should add itself to that array, then you avoid complex and resource intensive search in your scene.

 Does that make sense?

bye,

 Jean
Title: Re: ArrayMaker - Get all gameobjects with Tag
Post by: escpodgames on February 02, 2013, 08:52:43 PM
Thanks Jean,

Now that you have pointed it out it seems very obvious, thanks again for your help.