Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: goliath520 on December 06, 2012, 11:09:17 PM
-
I am difficulty changing a global boolean that appears in playmaker through c#. I searched around and most topics are related to getting a playmaker value and using it in a script but I want to modify it and have playmaker register it. Also, what would I use to make playmaker realize that this change happened? (Bool changed?) help would be greatly appreciated, I know its not that difficult I just don't know the syntax.
-
Try this:
FsmVariables.GlobalVariables.GetFsmBool("globalBoolName").Value = true;
Not sure what kind of change event you want?
The Bool Changed action just sends an event. You can do the same in script...
E.g., broadcast to all:
PlayMakerFSM.BroadcastEvent("boolChangedEvent");
Or send an event to an FSM:
var playMakerFSM = gameObject.GetComponent<PlayMakerFSM>();
playMakerFSM.Fsm.Event("boolChangedEvent");
Is that what you're looking for?
-
Awesome! Thank you so much! Works perfectly, like I hoped.