Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: uvavoo on June 12, 2014, 06:17:45 AM

Title: Trigger Unhappy! [SOLVED]
Post by: uvavoo on June 12, 2014, 06:17:45 AM
Hi Chaps,
Fairly new to playmaker but really liking it. Having problems with On Trigger Enter.
Set up a simple FSM (see screenshots) for on trigger enter and on trigger exit. Its supposed to change a couple of variables in a script, and on exit, change them back. It works fine, but sometimes once only, sometimes twice!!
When I enter the trigger a third or fourth time, nothing happens! Probably something glaringly obvious, but I can't see it. Please help.
Title: Re: Trigger Unhappy!
Post by: 1982 on June 12, 2014, 06:32:17 AM
Try using "Trigger event" with 'On Trigger Exit' at State2, so it goes back to start only when player leaves the trigger.
Title: Re: Trigger Unhappy!
Post by: uvavoo on June 12, 2014, 06:57:29 AM
Thanks for the reply, however your suggestion doesn't work either.
Cant understand why it does not go back to state 1 and wait for trigger to be activated again. Missing something but I don't know what.
Title: Re: Trigger Unhappy!
Post by: uvavoo on June 12, 2014, 08:58:51 AM
In case anyone is interested I have solved this problem. (see screenshots).
However, this setup failed as the other until I restarted Unity. Then it worked flawlessly. So I believe my original set up would work (with 1982's suggestion included).
This new set up of course will trigger when any rigid body enters the trigger. So I may go back to my old set up and try again.

I don't know whether or not this is a Unity or a Playmaker issue. (having to restart Unity to make something work). Has anyone else had similar problems?