playMaker

Author Topic: Listening for Script Events  (Read 1515 times)

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Listening for Script Events
« on: February 25, 2017, 12:24:34 PM »
Is there a way to receive script events in playmaker?

I see that you can add global transitions to a state, that includes custom (FSM) events, and system events, network events.

I have a script that sends events, such as "OnControllerObscured", that I would like to use as as a global transition.

Do I need to write a custom action to make that happen?

Thank you!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Listening for Script Events
« Reply #1 on: February 27, 2017, 04:06:48 AM »
Hi,

check out PlayMakerEventProxy.cs within "PlayMaker Utils" ( get it on the Ecosystem if you don't have that folder)

 it will show you how to quickly display a PlayMaker event property drawer inside a monobehavior and how to call it, which you will likely do within your OnControllerObscured call back.

 Bye,

 Jean

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Listening for Script Events
« Reply #2 on: February 27, 2017, 09:42:24 AM »
Awesome. Thank you for your assistance. Ill check it out.