Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: wheretheidivides on December 07, 2015, 09:12:23 PM

Title: Triggering from C# a playmaker FSm event
Post by: wheretheidivides 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.
Title: Re: Triggering from C# a playmaker FSm event
Post by: jeanfabre 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
Title: Re: Triggering from C# a playmaker FSm event
Post by: wheretheidivides 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.
Title: Re: Triggering from C# a playmaker FSm event
Post by: jeanfabre 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