playMaker

Author Topic: Check array for any objects with a specific tag?  (Read 3147 times)

OnyxRook

  • Playmaker Newbie
  • *
  • Posts: 7
Check array for any objects with a specific tag?
« on: June 04, 2014, 07:35:55 PM »
I feel like there's definitely a way to do this, and I'm just not finding it!

I'm using the custom overlap sphere action that someone kindly contributed to the forum to build an array of objects within range of my subject. I want to check that array to see if anything contained within it has a specific tag, and send an event.

The only ArrayMaker action I've found that utilizes tags just builds an array based on them.

Am I overlooking an specific action, or can someone suggest a way to get the results I'm looking for?

Thanks!! ;D

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Check array for any objects with a specific tag?
« Reply #1 on: June 05, 2014, 10:35:47 AM »
Try 'Array list find game objects by tag' I used the same sphere and this action to get the desired result.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

OnyxRook

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Check array for any objects with a specific tag?
« Reply #2 on: June 05, 2014, 07:03:44 PM »
Hi sebaslive!

Thanks for the reply, but I'm not sure I'm seeing how array list find game objects by tag works in this situation. That action just creates an array of objects with the defined tag regardless of where they are in the scene, and I think referencing the array pre-built with the overlap sphere simply overwrites it, doesn't it?


OnyxRook

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Check array for any objects with a specific tag?
« Reply #3 on: June 05, 2014, 07:11:57 PM »
Actually, to further define what I need, I'm essentially looking for an action that's exactly like 'Array List Contains', but with the option to look for a tag! :)

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Check array for any objects with a specific tag?
« Reply #4 on: June 05, 2014, 10:48:32 PM »
Oh okay, well, its not an array action but you could use 'game object compare tag' and run a loop that if it finds it, it does its action, like do damage and then remove that object from the list, get next random object in the array, run the 'game object compare tag' again and etc.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Check array for any objects with a specific tag?
« Reply #5 on: June 06, 2014, 06:56:04 AM »
hi,

 I'll work on that. Currently, you simply need to iterate trhough each gameobject in your array and compare it's tag. But an action would be convenient I agree.

task added to trello for this

 Bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: Check array for any objects with a specific tag?
« Reply #6 on: November 08, 2018, 03:00:55 AM »
Hi Jeanfabre...  Was this  Check TAG  Action ever created ??   

An action that checks the Tags of multiple game objects  that  enter into an area of a game object ?   ( not just a single game object ).

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Check array for any objects with a specific tag?
« Reply #7 on: November 08, 2018, 05:24:55 AM »
I don't think so, why can't you just add all the objects that entered the area to array and iterate? It's simple and fast.
Available for Playmaker work