REDNODE / DOCS

Counter panel

Example apps / counter-panel / v0.2.0

Node modneeds counter-service

Calls Counter service through REDnode's mod services, hears its events, and tries a timeout, Stop, an error and an unknown function.

Simulated game starting
Mod log

    Here the service runs in the same preview; in the game it is a package of its own, and the host carries each call.

    How it works

    service.connect("counter-service") finds the other package by its id and answers what it offers; each of its functions is then a method that returns a promise.

    counter.$on("changed", ...) hears the service's events. counter.$with({ timeoutMs, signal }) gives calls a timeout or an AbortSignal.

    Its rednode-app.json lists "counter-service": ">=0.1" in requires, so the Mod Manager shows it as missing before the panel runs.

    What it uses

    service.connect $on $with requires

    Try this

    Use it

    Copy the files into red4ext/plugins/REDnode/apps/counter-panel/ in the game folder, or start your own package from them: change id and name in the manifest first. The whole folder is on GitHub.