playMaker

Author Topic: Best way to find all game objects with specific variable value?  (Read 660 times)

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Is there a way to find all game objects with a certain variable value easily?


Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Best way to find all game objects with specific variable value?
« Reply #1 on: May 15, 2022, 12:44:10 PM »
Well it really depends on what are you tracking exactly?

You could change the objects tags if it's just one thing you're tracking, and then find them by tag.

Another idea is child to the same parent object when they hit a value, and then find all that parent object's children when you need to.

Or, this one is easy, just add the objects to a shared array when they hit that value and check the array when you need to. Remove them when they're out of the value range.

On the more advanced side, you could put objects in an array then have playmaker loop to test every array object in order for the variable. Then make another array with the true results so you have the list.

There's also database type stuff for playmaker that might help but is certainly a bit complicated.
« Last Edit: May 15, 2022, 12:57:25 PM by Twood »

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: Best way to find all game objects with specific variable value?
« Reply #2 on: May 15, 2022, 07:39:09 PM »
Those are all great ideas thanks!