Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How can I do live methods?

A topic by MaxLos created 97 days ago Views: 124 Replies: 1
Viewing posts 1 to 2
(1 edit)

Hello, I don't quite understand how I can reload local functions or I guess 'methods' using GMLive. I keep getting an error telling me to use 'live_method' instead of 'method'.


For scripts created in the IDE, I understand that you do:
if (live_call()) return live_result;
And then if the script has any arguments you'd put them in between the parenthesis.

But if I have a local function like this:
var my_function = function()

  * blah blah*

}

What is the syntax for setting up live reloading for that? Thank you

Developer(+1)

Hello, you would put live_call inside the local function and add live_name so that GMLive can tell what’s going on, like so:

var my_function = function(a, b) {
    live_name = "my_function";
    if (live_call(a, b)) return live_result;
    ...
}