Hi,
I Know how to send regular events but the delayed event signture doesn't work for me yet, Maybe Alex will shade some light on this. I'll give you the script snippet I have to send regular events.
the key is to have a fsmComponent pointer at hand. Without this it's not possible. ANY Fsm component in your scene will do, so either you make a public PlaymakerFSM variable (fsmProxy in the script below) and drop a fsm component in it, then in your script have this:
// set the target to be this gameObject. You can point to any GameObject in the scene of course.
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. check the 'target' this to modify the behavior
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("Hellooo there!");
// send the event
fsmProxy.Fsm.Event(eventTarget,fsmEvent.Name); // works only because I declare the event as string here, not using the FsmEvent class itself.
// send the same event bu delayed
fsmProxy.Fsm.DelayedEvent(eventTarget,fsmEvent); // TOFIX: doesn't work because delayed event only have one signature and it's using the FsmEvent.
So hopefully this will give you a head start on what to do to fire events. I actually had to send a delayed event, and ended up implementing an invoke() call in my script to implement the delay in the script instead of with the event itself, the result is identical in the end.
There are more api goodies to make sure the event exists or actually get it somehow, but I haven't had time to investigate these api fully yet. Maybe Alex will be able to develop on these a bit more.
Bye,
Jean