playMaker

Author Topic: Template Event Output : Bug or am I doing it wrong?  (Read 1110 times)

CSmith

  • Playmaker Newbie
  • *
  • Posts: 6
Template Event Output : Bug or am I doing it wrong?
« on: May 17, 2021, 07:47:04 PM »
Hello all,

I've created a template to scan for nearby enemies then trigger one of 2 events (Target found / Target lost) for the Host FSM to tie into.



(images on this forum seem to post extremely small.  Here they are on Dropbox if it helps:  https://www.dropbox.com/sh/4yda0d9rplwmjp5/AAAM_mUEBMEgiW3TNXeTrK9Pa?dl=0)

To trigger the event from the template to the host, I used "Send Event" set to SELF and put in the event that I set as "output":



On the Host FSM running the template, I used the dropdowns to do the usual "New Event" option:




But I get this error in the console:



Eventually I saved and restarted Unity and tried again, then it lets me create a New Event this way.  I have been trying this several times across a few days and each time I make a change to the template, It gives me this error and I have to restart Unity to get it to let me set an event or create a new one.

RELATED ISSUE 2:

When I get it working, the behavior is odd to me and trying to understand it.  On any normal state if we create a new event, we get the inline red warning that there is no transition where we have the option to create one.

With templates, I set the event and there is no warning.  Playmaker seems fine having no actual transition to be triggered from the Template event.  Is this the correct behavior or is this also a bug?

It's especially weird when the "Finished Event" right below the template output events works completely normal with no errors and when you set an event that doesn't have a transition, it gives the normal warning.

Would love any feedback on this.  I want to be able to create a bunch of templates that have predictable and normal functioning outputs, but so far it's errors and no warnings about missing transitions.

ADDITIONAL:

Here is more deets on that error if needed:





















« Last Edit: May 17, 2021, 07:49:23 PM by CSmith »

CSmith

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Template Event Output : Bug or am I doing it wrong?
« Reply #1 on: May 17, 2021, 09:55:47 PM »
ALSO:

The Template output events don't seem to fire on the start frame.

I put a log in my template when it did the SEND EVENT, and on the Host did a log triggered from the event.  On the start frame, the template log would fire but not the Host log.  Although it would on later frames.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Template Event Output : Bug or am I doing it wrong?
« Reply #2 on: May 18, 2021, 07:11:10 AM »
Hi.
on the run fsm action your output variable : O_NearestTarget is None this will cause an error.

The errors says that it is trying to set a value but can't.
I did a test on response and there is indeed an issue if it returns a output event in the same frame.

to solve for now you can can do a 'Next Frame Event' on the run fsm template.
I will report to Alex.

CSmith

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Template Event Output : Bug or am I doing it wrong?
« Reply #3 on: May 18, 2021, 02:08:23 PM »
Much appreciated. I'll retest that soon.  I ended up killing the idea of event outputs and just did a bool that the host would have to test.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Template Event Output : Bug or am I doing it wrong?
« Reply #4 on: May 19, 2021, 05:19:00 PM »
This is a bug, Output Events were not firing on the frame that the FSM was entered. It will be fixed in the next update.

I'm still investigating the other issue with creating New Events.

Thanks for the bug report!