Hi,
You can broadcast a global event from script by calling this:
using HutongGames.PlayMaker;
(...)
PlayMakerFSM.BroadcastEvent("GLOBAL HELLO");
If you want to fire an event to a specific Fsm, you can do this:
FsmOwnerDefault goTarget = new FsmOwnerDefault();
goTarget.GameObject = new FsmGameObject();
goTarget.GameObject.Value = this.gameObject;
goTarget.OwnerOption = OwnerDefaultOption.SpecifyGameObject;
// send the event to this gameObject and all its children
FsmEventTarget eventTarget = new FsmEventTarget();
eventTarget.excludeSelf = false;
eventTarget.target = FsmEventTarget.EventTarget.GameObject;
eventTarget.gameObject = goTarget;
eventTarget.sendToChildren = true;
// create the event.
FsmEvent fsmEvent = new FsmEvent("HELLO");
// send the event
fsmProxy.Fsm.Event(eventTarget,fsmEvent.Name);
fsmProxy being a reference to a PlayMakerFsm component.
You can see it in action in the Photon bridge itself:
PlayMakerPhotonProxy.cs
PlayMakerPhotonGameObjectProxy.cs
Does that help?
bye,
Jean