playMaker

Author Topic: Trigger Event doesn't work  (Read 8633 times)

divertoso

  • Playmaker Newbie
  • *
  • Posts: 15
Trigger Event doesn't work
« on: January 31, 2013, 07:57:28 PM »
playmaker: 1.4.4f3

hi

the Trigger Event doesn't wor on playmaker 1.4.4f3 ?

look the image attached.

i found this on release notes:
Quote
Big performance optimization for Collision, Trigger, and Mouse Events. Note, if you handle collision or trigger events in custom actions you now need to do a little extra initialization. See Collision Event or Trigger Event actions as examples.

but i don't have this examples...

what else should i do to this action work ?

tks

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Trigger Event doesn't work
« Reply #1 on: January 31, 2013, 09:18:34 PM »
looks to be the same issue I am having here http://hutonggames.com/playmakerforum/index.php?topic=3052.0 as it was adapted from this script.

divertoso

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Trigger Event doesn't work
« Reply #2 on: February 01, 2013, 05:26:27 AM »
hi Sjones

what did you do with the triggerCount.cs ? put in the playmaker folder?


Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Trigger Event doesn't work
« Reply #3 on: February 01, 2013, 10:56:37 AM »
playmaker actions folder, yeh, same place as trigger event, it was working in 1.4 but not 1.4.4f3 (though on the asset store it is saying its 1.4.5? is the issue here)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trigger Event doesn't work
« Reply #4 on: February 08, 2013, 03:20:01 AM »
hi,

 I think it's simply because you overlooked that fact that you need to explicitly tell a fsm to implement these events:

Code: [Select]
Fsm.HandleTriggerEnter = true;

 You do that on Awake for the action that you want to receive triggerEnter call.


bye,

 Jean

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Trigger Event doesn't work
« Reply #5 on: March 18, 2013, 01:09:28 AM »
Soo... do we have to go into the code of the FSM to tell it to be explicit in handling triggers?

Because this issue is also happening with me as well... it's kinda borking out my game's AIs since they use the triggers as their master on/off switch (and for combat and such.)

It's kinda iffy too... as in, if the object is not moving, it's not (at all) accepting trigger information, so, needless to say this is posing a bit of a problem with my AI systems since they all rely on triggers to control when to turn on their monitoring systems (and other sub-systems.)

Did some testing, it's not just the trigger enter either, it's Stay and Exit as well (and also the hard-coded events "TRIGGER ENTER/STAY/EXIT" Too which have their own behavior attached.)
« Last Edit: March 18, 2013, 01:11:00 AM by Red »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trigger Event doesn't work
« Reply #6 on: March 18, 2013, 02:49:34 AM »
Hi,

 not if you are using the built in playmaker actions provided with the packages. If you create your own custom action, then yes.

 Is it not a case where you messed up your collider set up in your scene to begin with? it happens to me... at least one of the object must have a physics component for collision and triggers to work.


bye,

 JEan

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Trigger Event doesn't work
« Reply #7 on: March 18, 2013, 09:49:29 AM »
Umm, well, it seems that the only physics components that want to work with stationary triggers are either rigid bodies or character controllers. other triggers don't seem to recognize themselves if they don't have those on them.

They will sometimes (as in, intermittently) recognize themselves if they are moving around somehow but even then it's iffy at best and this is just colliders interacting with one another... I would like to know if this is an actual bug or if it's just one of those quirks that we have to deal with... they used to be much more sensitive before now it doesn't seem to be the case.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trigger Event doesn't work
« Reply #8 on: March 18, 2013, 09:52:16 AM »
Hi,

 I guess, your problem might be elsewhere, maybe something fills the framerate and your physics engine struggle. Usually, it's something plain simple, yet very difficult to pin point without messing around big time...

 I am ok to have a look at your scene if you can send it to me.

bye,

 Jean

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Trigger Event doesn't work
« Reply #9 on: March 18, 2013, 01:23:02 PM »
http://rapidgator.net/file/eb301e49b38494356a54224af9aa566c/ColliderTestPackage.unitypackage.html

Here's a link to the test package i've set up to show what i mean.

It seems that the triggers are only working when there is either a rigid body or a character controller on them... so, this kinda puts the kibosh on the detection systems i have that control things like turning on the AI, dealing Area of Effect damage (and others) It wasn't like this before afaik...

I'll also toss in a scene with the AI in question in PM (it's one of the asset pack ai's... so, it's in a testing phase right now... i'm kinda building the next tutorials on taking the basic ai to the next level of functionality and this is a bit of a hurdle to doing that.)

And i'm using Playmaker 1.5.4 f3 and Unity 4.0.1 f2 if it helps.

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Trigger Event doesn't work
« Reply #10 on: March 18, 2013, 01:55:53 PM »
Also, further testing with the character-controllers and rigidbodies, the trigger event is still seeming to fire off the trigger-exit in the example even when the player is still within the field (this is with a "Set position" action on a mouse-driven pointer object.)

Also, further testing shows that when using a "move towards" instead of the "Set position" with the mouse pointer target object thingamabob, it's still firing off the "Exit" as soon as it enters into the state after doing the rest of the actions in the stack... so, something's definately not working properly with the trigger event actions.. the system events themselves aren't seeming to be impacted, but as you can probably figure, since you can't really filter those system coded events themselves (and they are set as "anything entering, exiting or staying) it is presenting a bit of a problem if we need to be explicit in which objects we want to have the trigger systems detect when exiting and entering.