Calling custom behavior in a StartOnEvent decorator

Is it possible to access the Jibo SDK’s global event emitter from custom javascript files? For instance, I can add an decorator like StartOnEvent as a condition for a particular action. This decorator asks you to specify the “eventName” for which it will listen.

I’d like to be able to emit that particular event from my own javascript code, but need to access the same instance of the emitter to do so.

The event emitter is global to the behavior tree, and all listeners are pre-subscribed. You can create your own behavior or decorator using a custom emitter by creating your own schema and defining your custom decorator or behavior in a js file — see the sample code “SucceedOnTouch” decorator on github for an example of this.

To put it a little more generally, you are creating a custom behavior/decorator (as described here) and then you would call its name in the StartOnEvent/SucceedOnEvent argument.