playMaker

Author Topic: Get Object(s) with Tag...  (Read 1428 times)

Red

  • Hero Member
  • *****
  • Posts: 563
    • View Profile
Get Object(s) with Tag...
« on: June 17, 2011, 04:26:08 PM »
so, the game that i'm making uses tags to the fullest... basically, player tags are players, enemy tags are enemies, i can imagine you get the idea.

i was looking through the action lists and it doesn't seem to have an intuitive "get" associated with the tagging system in unity. i understand that in some cases it would probably return more than one result which would probably require some sort of array variable kinda thing and though i can make the single-player portion of the game just fine without having to specify or search via tag, when it comes to multiplayer, that would mean i'd have to rework the AI systems i'm working which could potentially lead to issues or just general buggyness...

if there isn't a "get via tag" sort of system, is there a workaround you can suggest?

Red

  • Hero Member
  • *****
  • Posts: 563
    • View Profile
Re: Get Object(s) with Tag...
« Reply #1 on: June 17, 2011, 04:27:13 PM »
oi, i am such a n00b... nevermind... found it. *facepalms*

Red

  • Hero Member
  • *****
  • Posts: 563
    • View Profile
Re: Get Object(s) with Tag...
« Reply #2 on: June 17, 2011, 05:39:22 PM »
Okay... so, since i asked an AI question and found a solution, thought i may as well share how i got the basic "check if player and within distance" wired up... part one of basic AI completed. (i'm sure most will already know this but since i'm a newb and i know i'm not the only one, may as well share this.)

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Get Object(s) with Tag...
« Reply #3 on: July 04, 2011, 10:38:48 AM »
Hey answering your own questions and adding extra info is awesome for everyone! Thanks.. I have no need for this right now but like to encourage.

Q