Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: westingtyler on February 13, 2017, 04:33:01 AM

Title: Get all objects in scene with a tag and store in array.[SOLVED]
Post by: westingtyler on February 13, 2017, 04:33:01 AM
If there is not currently a way to do this, it would be super helpful.
Title: Re: Get all objects in scene with a tag and store in array.
Post by: Fat Pug Studio on February 13, 2017, 05:21:13 AM
I sorted it out by adding an FSM to each object which adds an object to array OnVisible, and removes it on OnBecameInvisible.

If you want to put all objects in scene to array, visible or not, just add them to array on level loaded, iterate the array and remove objects that don't match the wanted tag.
Title: Re: Get all objects in scene with a tag and store in array.
Post by: elusiven on February 13, 2017, 06:14:39 AM
It won't be very efficient though if you have a lot of objects and you add an FSM to each one, you lose performance every time you add an FSM to a gameobject.

Let me know if you still want this action
Title: Re: Get all objects in scene with a tag and store in array.
Post by: jeanfabre on February 14, 2017, 02:52:05 AM
Hi,

 I have just done it, it's on the Ecosystem.

https://twitter.com/JeanAtPlayMaker/status/831409530043060224

 Bye,

 Jean
Title: Re: Get all objects in scene with a tag and store in array.
Post by: westingtyler on February 24, 2017, 08:10:58 PM
That is fantastic. Keep kicking ass, guys.