Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

[Fixed in 1.0.31+] GMLive still runs despite of live_enabled set to 0?

A topic by mrvictordiaz created Aug 21, 2020 Views: 386 Replies: 6
Viewing posts 1 to 4
(1 edit) (+1)

Not sure what's going on, but this happens on an empty project. Nothing in it, other than barebone GMLive objects, extensions, etc setup.

Setting live_enabled to 0 still allows GMLive to run for some reason?

Developer

This isn't currently supported in 2.3 version - I haven't figured out how to do this best yet since if-macro doesn't work for not compiling a script at all, and scripts cannot be included/excluded per configuration

(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.

Developer(+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.

Developer(+1)

Fixed in 1.0.31.