playMaker

Author Topic: Trigger Exit issues  (Read 974 times)

wirejaw

  • Playmaker Newbie
  • *
  • Posts: 49
Trigger Exit issues
« on: January 04, 2022, 10:22:04 AM »
I haven't been able to find a solution for an issue I'm having where Trigger Exit is not working as expected.  I have a prefab block that is triggered to become active with a switch and then turn off after a set time period.  When I place one of these blocks in the air and jump onto it (using a third person character setup), and then the block is switched off, the player falls down as intended.  I have a jump trigger set on my player that is set to be triggered off using On Trigger Exit, but it does not turn off in this case, and so I can jump while falling and go into flappy bird mode.

I've read this thread https://hutonggames.com/playmakerforum/index.php?topic=23771.0 and I looked into disabling my jump fsm when the block is switched off, but that is not working because the block is a prefab and I have several clones that can be turning on and off at different times, and if I set the jump fsm to disable it will turn off with each block being switched.

@djaydino could you elaborate on your suggested trigger event stay solution?  Any other help with this would be awesome.  Thanks.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Trigger Exit issues
« Reply #1 on: January 04, 2022, 11:34:48 AM »
Hi.
I usually have a separate fsm that has 2 states :

State 1
Trigger Stay (transition to state 2)
Set bool False

State 2
Trigger Exit (transition to state 1)
Set bool True

now on other fsms you can use 'Fsm Bool Test' (Ecosystem)

Main reason is that if you exit the trigger when the current state is not on the state with a trigger exit, it will not trigger the event anymore since you already exited before the action is checking.

wirejaw

  • Playmaker Newbie
  • *
  • Posts: 49
Re: Trigger Exit issues
« Reply #2 on: January 05, 2022, 11:03:18 AM »
Thank you!  I was able to get it working.