DispatchGMS provides an easy-to-use framework for dynamic dispatching of script callbacks. This enables greater flexibility by allowing, at runtime, for the creation of custom events and the extension of GameMaker object events.
[Features]
[Script Reference]
http://stephenloney.byethost31.com/DispatchGMS/DGMS_Script_Reference.html
[Basic Code Example]
/// [Create Event]
// Create new dispatcher for custom mouse event
onMousePress = DispatcherCreate();
// Add script callbacks to dispatcher
DispatcherAdd(onMousePress, id, ShowMessage, "Mouse Button was pressed!");
cbAddNums = DispatcherAdd(onMousePress, id, ShootTargets, obj_Enemy, obj_Barrels);
// Remove second callback from dispatcher
DispatcherRemove(onMousePress, cbAddNums);
/// [Mouse Button Press Event]
// Execute dispatcher
DispatcherInvoke(onMousePress);
/// [Destroy Event]
// Destroy and nullify dispatcher
DispatcherDestroy(onMousePress);
onMousePress = DispatcherNull();
/// [Room End Event]
// Destroy and nullify dispatcher
if (persistent == false && room_persistent == false)
{
DispatcherDestroy(onMousePress);
onMousePress = DispatcherNull();
}
Be sure to check out some of my other assets!
End User Licence Agreement (EULA).