playMaker

Author Topic: Triggering from C# a playmaker FSm event  (Read 2337 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
    • View Profile
Triggering from C# a playmaker FSm event
« on: December 07, 2015, 09:12:23 PM »
So I have a C# script and want to play a playmaker event.  I am not sure all about broadcasting but here is what I have that doesn't work.

C# script
PlayMakerFSM.BroadcastEvent("TextFX-BestScore");

in playmaker I have a global event set up.  So I guess I am trying to trigger this global event so it can do stuff.  It doesn't.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: Triggering from C# a playmaker FSm event
« Reply #1 on: December 07, 2015, 10:24:34 PM »
Hi,

-- Double check your PlayMaker event is set to Global.
-- triple check that your c# string event is exactly the name of your PlayMaker global event.

Else, when are you calling this in your game, at the start or during the game? and are you sure your fsm supposed to receive it is not disabled or indeed it receives it but for other logical reasons in your Fsm, the active states switches to another state?

 Bye,

 Jean

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
    • View Profile
Re: Triggering from C# a playmaker FSm event
« Reply #2 on: December 07, 2015, 10:52:41 PM »
Yes- picture shows its global
yes -picture and text shows its same text.
and yes.

I have the c# script on a separate game object that is always active.  I call it when an event happens during the game.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: Triggering from C# a playmaker FSm event
« Reply #3 on: December 09, 2015, 12:16:15 PM »
Hi,

 Can you paste the c# script? At this point I would put a debug log one line before broadcasting to make sure it's actually executed.

 Bye,

 Jean