Orange Event Manager

Orange Event Manager 1.0
Hudell
​
Introduction
This plugin is intended to be used by other scripts. It will allow scripters to create event listeners and attach functions or common events to them.


How to Use
You can create your own eventmanager class using MVC:



Code:
var MyClass = MVC.shallowClone(OrangeEventManager);
To attach a method to an event, call:
Code:
MyClass.on('something', MyClass.doSomething);
To attach an RM common event to an event, call:
Code:
var commonEventId = 15;MyClass.on('something', commonEventId);
To run everything associated with an event, call:
Code:
MyClass.runEvent('something');
Plugin
Get it from here

Dependencies
None, but MVCommons is recommended.

FAQ
I'll keep a small FAQ here for easy reference.

Credit and Thanks
- Hudell
I'm not sure that i have understand what this plugin do, i'm looking a way to call a MAP EVENT instead a common event, it is possible?
Best
I'm not sure that i have understand what this plugin do, i'm looking a way to call a MAP EVENT instead a common event, it is possible?

Best
Taking the example of my time system, that uses this plugin:

People can register a common event to be called every time the day changes, like this:

OrangeTimeSystem.on('changeDay', 15);
That script call is registering the common event 15 to be called when the day changes.

That works because inside the OrangeTimeSystem, I call this every time the day changes:

OrangeTimeSystem.runEvent('changeDay');
This is the work of the event manager. Usually, it will only be used by scripters to add similar features to their own plugins.
Is it possible in any way to execute a common event during battle? I need to change formation during battle. Can this event manager help me with that?
Can this event manager help me with that?
Nope, this is something else.
I need to find a better name for this plugin :X
Is it possible in any way to execute a common event during battle? I need to change formation during battle. Can this event manager help me with that?
You can easy do it with the standart features, in Database>Troops>Conditions

common.jpg

Original thread: https://forums.rpgmakerweb.com/threads/orange-event-manager.46504/