playMaker

Author Topic: Trigger event not working  (Read 152 times)

BadgerBear

  • Playmaker Newbie
  • *
  • Posts: 4
Trigger event not working
« on: September 19, 2022, 08:39:10 AM »
I have multiple colliders in my game that has trigger checked. My problem is that even though I have said that box A should wait for game object Key A , Key B can still trigger Box A collider.??

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Re: Trigger event not working
« Reply #1 on: September 20, 2022, 09:05:40 AM »
You can use tags to limit what objects can interact with your triggers.

You can also save the collider (in this case it would be KeyB) and GetName, then test against the name to see if it's a valid collider.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7086
    • jinxtergames
Re: Trigger event not working
« Reply #2 on: September 21, 2022, 07:46:38 AM »
hi.
if you will have many triggers to interact you should not do trigger events on each object, but have a trigger on your player to detect those objects.

if you get many triggers looking for player, it will hit performance.

you can use tags like Door / Key / Item / etc to know what you detect, and you can store the object that you detected.

Then on those object you can set a fsm Called (for Example) Data.

And you can access then with Get/Set Fsm actions and/or Send event by name (for example to open a door)