Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: SolarFalcon on May 03, 2017, 03:49:00 PM

Title: Help me understand events
Post by: SolarFalcon on May 03, 2017, 03:49:00 PM
Hello :)

I just got Playmaker recently and I'm trying to integrate it into my project with some enemies I've already written scripts for. With this particular enemy, I have a Bezier Spline script that I want to use Playmaker to change the Bezier Spline once one spline is done. I have a function that accomplishes this, but all I want Playmaker to do is call the function with CallMethod.

So far, in my FSM attached to the object ("Nautilus"), I have two states, Check Duration (the start), and Change Spline.

Check Duration has the action Bool Any True, and only checks to see if splineComplete is true. If it is true, it should fire off the splineDone event.

The splineDone even should transition from Check Duration to Change Spline but it never happens. In my script, I have an if block that checks the spline progress, and if it is equal to 1 then it sends splineComplete = true if not it is false.

Not sure why this isn't working. I hope I explained this properly, please help me out! I've watched a few tutorials for events and it appears that I'm setting this up right. In the inspector, the bool value even changes like it should, but the splineDone event NEVER fires. What gives?
Title: Re: Help me understand events
Post by: SolarFalcon on May 03, 2017, 09:58:51 PM
Apparently either I'm using "Bool Any True" incorrectly or it doesn't work as intended. I've found a way around this strangeness by using a Wait instead of the way I was trying to control it.

Also, I know this appears to be a noob question, but due to this weird error I thought maybe I was doing something wrong with events. That's why I asked here hoping maybe someone knew what was going on or had encountered this before.
Title: Re: Help me understand events
Post by: djaydino on May 04, 2017, 12:31:43 AM
Hi,
Did you check 'every frame' ?

If you are just checking one bool maybe it is better to use a 'bool test' instead and only send an event if true.
Title: Re: Help me understand events
Post by: SolarFalcon on May 05, 2017, 03:07:00 PM
Hi,
Did you check 'every frame' ?

If you are just checking one bool maybe it is better to use a 'bool test' instead and only send an event if true.

Yeah I tried every frame, but I did not know about Bool Test, somehow I missed that. Thanks! That works much better! I knew I wasn't trippin out. Playmaker is just divine.