playMaker

Author Topic: TRIGGER Event not using collider tag  (Read 3045 times)

speedyracer

  • Playmaker Newbie
  • *
  • Posts: 2
TRIGGER Event not using collider tag
« on: August 07, 2014, 02:29:59 PM »
I have trigger that is supposed to activate when a Player tag enters it and do nothing when an object with AI tag enters.  Both gameobjects are pre-fabs.

It seems to trigger when any tag is in the trigger area. I want to only trigger when the player enters.

So, in reading the forums is there still an issue of detecting pre-fab with child colliders?  Or is it my flow:

Idle                          ->   PlayerCrossesLine      
Trigger Enter                  Trigger Event
                                     Collidertag = Player         -->        [Show Menu]
                                     Trigger Event
                                     Collidertag = AI               -->        [go back to Idle]

How to set up conditional logic based on the gameobject tag? Would it be better to use Trigger Info and get the tag name?

Secondly, after the trigger enters fires once, shouldn't it fire again when another object enters? It seems stuck in the 2nd state even if another object enters the trigger.

Thanks.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: TRIGGER Event not using collider tag
« Reply #1 on: August 07, 2014, 03:02:09 PM »
Hello,
Use Trigger event action from action browser, there you can set the player tag.
Return to that Idle trigger state if you want the trigger to react again.

speedyracer

  • Playmaker Newbie
  • *
  • Posts: 2
Re: TRIGGER Event not using collider tag
« Reply #2 on: August 07, 2014, 06:17:46 PM »
Okay thanks, I wasn't sure if it was needed.

I created a test scene and it works in detecting the player or the AI. But, I guess in my game the child colliders are keeping the object from being detected.