Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics


Livecoding for GameMaker: Studio / GameMaker Studio 2 · By YellowAfterlife

Apply gmlive to all object events from one single place/piece of code

A topic by ajlapm created Jan 07, 2023 Views: 151 Replies: 1
Viewing posts 1 to 2

Is it possible to do this without literally pasting "if (live_call()) return live_result;" in all events of all objects - without needing to post macro code in all events of all objects - so that it applies everywhere but doesn't require going through the whole project and inserting a line of code over and over and over again in all events?


You can use the new macro (or make your own macro since events don’t need arguments anyway), but otherwise you’d need something to copy-paste the code snippet around, be it by hand or automatically - GameMaker does not currently offer anything that could be used to prepend code into places without modifying the files.

The cornerstone of the extension’s function is that live_call figures out who’s calling it, whether there’s a new version of that event/function loaded, and returns true after executing it if so.

GMLive is by all means a pretty big extension, but it does not do any sort of black magic (compared to, say, my most recent extension)