On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

I made a Release config and put these as macros:

//GMLIVE
#macro         live_enabled 1
#macro Release:live_enabled 0

And in obj_gmlive's Create Event I tweaked it like so:

if (live_enabled) {
    live_init(NULL, "http://localhost:5100", "");
}

So when I choose the Release config I don't get the "HttpError:HttpSendRequest: A connection with the server could not be established" message so it seems like it's turned GMLive off

Looks like it works. Is there any side effects to this?

Still looking for a quick way to enable/disable it temporary since I got a ton of live calls, it'd be a chore to have to delete/add those live calls lines back again.

(+1)

Haven't run into any side effects yet. It just keeps the live_init from running, but I guess it could go where you spawn the GMLive object even, to make sure it isn't in the game at all.  To switch configs quickly just use the drop-down at the top-right of GM where it has the crosshairs icon. It's faster than adding/removing anything.

(+1)

The idea behind macro was that GMLive scripts should be empty or excluded from the build entirely.

It does seem like in 2.3 we can do

if (macro) function name() {}

so I'll see about doing this for the next build.