Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Malpraktice on June 07, 2020, 12:53:54 AM

Title: [1/2 SOLVED]Trigger Event: Collide Tag seems broken?
Post by: Malpraktice on June 07, 2020, 12:53:54 AM
I'm setting up Playmaker in a project and using the Trigger Event action in a state. The action is triggering, but not obeying which Tags should be setting it off.

I've setup a hitbox, assigned which Collider Tag I want setting off the event, and given it a send event (basically made sure to fill out each field in the Trigger Event action).

The problem looks to be that ANY Collider Tag seems to trigger the action, regardless that I specified only 1 Tag to be the trigger. In my example pic, the only Tag that should be setting off the event is a game object tagged as "REAL_Car". However, everything is setting off the action instead. I have AI cars in my project with their own tag of just "Car" and I made sure to specify hoping this exact issue wouldn't happen. Instead, they are also setting off this trigger.

Any suggestions? I feel like this should be really simple so I can't help but wonder if it's actually a bug? Thanks for any help folks!

Title: Re: Trigger Event: Collide Tag seems broken?
Post by: djaydino on June 07, 2020, 04:11:32 AM
Hi.
You should use a different event, not Finished.
Finished event is mainly for actions that do not have an event.
Title: Re: Trigger Event: Collide Tag seems broken?
Post by: Malpraktice on June 07, 2020, 07:28:49 AM
Thanks for the tip!

I've updated that Send Event to be unique now. It still seems to misbehave though?

I've included a larger screenshot to show the FSM I've setup too (just a basic loop to verify if the player has entered and then exited a hitbox). The "player" has the REAL_Car tag on them (which I believe I'm referencing in the Trigger Event properly?). All of my AI traffic has a different "Car" tag applied instead. Yet anything that passes through the hitbox seems to fire this FSM's trigger event regardless?
Title: Re: [1/2 SOLVED]Trigger Event: Collide Tag seems broken?
Post by: Malpraktice on June 07, 2020, 11:22:37 AM
Just a quick update in case anyone else gets stuck like me - I was able to get things to work but it had nothing to do with the Trigger Event action in Playmaker.

I'd still like to know if we're supposed to be able to control what can set off those trigger events with Tags as that's what it looked like originally. As of right now, that Collider Tag does nothing for me still so I still wonder if that feature doesn't work?

But I ultimately solved this by creating a new Layer in Unity and adjusting the Physics Matrix under Project Settings so that the layer I gave the original "radar" was only able to interact with an object I labelled and added to the bumper of my Player. Playmaker still handles the trigger itself, but the collision recognition seems to all happen via Unity this way now.

Thanks!
Title: Re: [1/2 SOLVED]Trigger Event: Collide Tag seems broken?
Post by: djaydino on June 07, 2020, 01:09:27 PM
Hi.
Trigger by tag should work fine, i use tons of them in our projects.

Try storing the object so you can see what it found.
Maybe some other object has that Tag

Also try on a clean scene and test with a few triggers.