Home

Awesome

<h1 align="center">GMS 2.3+ NotificationSystem | v1.2.6</h1> <p align="center"><a href="https://larsandersson.info">larsandersson.info</a></p> <p align="center">X: <a href="https://twitter.com/Babaganosch">@babaganosch</a></p> <p align="center">Download: <a href="https://babaganosch.itch.io/notificationsystem">itch</a></p>

NotificationSystem is a lightweight signals framework for GameMaker Studio 2.3+. It's extremly simple to setup and easy to use.

You only need the 'NotificationSystem' script, but this whole repository contains a demo project showcasing a simple implementation.

<p align="center"> <img src="https://raw.githubusercontent.com/babaganosch/open_storage/master/notifications.gif"> </p>

Changelog

v1.2.6

v1.2.5

v1.2.4

v1.2.3

v1.2.2

v1.2.1

receiver = new Receiver(["controllers", "effects", "channel5"]);
// or
subscribe(["controllers", "effects", "channel5"]);

Installation

Usage

// Initializing the listener
receiver = new Receiver();

receiver.add("Monster killed", function(amount) {
    increase_score(amount);
});

receiver.add(MESSAGES.death, function() {
    game_restart();
});

receiver.add(3, function() {
    show_debug_message("Message 3 received!");
});
// Subscribe to channel "enemies"
subscribe("enemies");

// Subscribe instance 100010 to channel "enemies"
subscribe(100010, "enemies");
receiver.add("hello");
broadcast(MESSAGES.death);

broadcast("Monster killed", 10);

broadcast("hello", function() {
    show_debug_message("hello, world!");
});

broadcast_channel("hello", "enemies");
// Don't waste time trying to send me any new messages. I'm not home!
unsubscribe();

Documentation

Check out the wiki for further documentation.