Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

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

[Fixed] merge_colour (UK spelling) returns 0 instead of merged colour?

A topic by baku created Jun 11, 2018 Views: 342 Replies: 1
Viewing posts 1 to 2
(1 edit)

merge_colour, with the UK spelling, doesn't work while using live, it just returns 0 instead of the merged colour.

merge_color, with the US spelling, does work correctly.

To reproduce in a new project with GMLive.gml, add the following to obj_gmlive Draw:

var _col1 = c_fuchsia;
var _col2 = c_aqua;
var _blend = (sin(current_time / 1000) * 0.5) + 0.5;
draw_text(0, 0, string(merge_color(_col1, _col2, _blend)));
draw_text(0, 20, string(merge_colour(_col1, _col2, _blend)));

Running the project with live enabled, we see merge_color works, and merge_colour works for a hot second but then starts returning 0 after "Ready!" pops up in output console.

Developer(+1)

Apparently this specific case is due to fact that IDE auto-completion file that I use to generate API scripts (fnames) has a duplicate entry for merge_colour that is in wrong format. Will be fixed in next version.