Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

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

[Solved] Does not work with parents and event inheritance?

A topic by _MHG_ created Mar 25, 2019 Views: 1,032 Replies: 4
Viewing posts 1 to 3
(1 edit)

Hi,


First of, this is an excellent tool and I hope you continue improving it!

So I tried using the live call and live result line in a parent object's step event and set the child object to run event_inherit in its own step event. However, it didn't seem to update.  If the  line of code is place in the step event directly, it works. Just wondering if inherited events is something that is currently not supported, or if I'm doing something wrong (I did check to make sure no casual mistakes were made).

Thanks!

Developer(+1)

GMLive applies to event that the live_call is called from - so, if you want to update changes in both parent's and child's step events, you'll need to add the snip in both of them. For slightly better understanding, GM events are essentially special scripts, and event_inherited simply calls the next script in inheritance chain, so having that live-updated (which, in turn, executes the new event code inside live_call()) does not have any effect on scripts/events that call it.

(2 edits)

^Thank you for the reply.

Was hoping I could clarify another issue. I read the limitations and from what I gather,  one should be able to use scripts. 

However, if I include the live snip inside a script from the resources tree and proceed to use the script in an object's step event (for example scr_game_test() ), the code inside the script doesn't seem to work even if the snip is on the top line, above scr_game_test and on the first line inside the script as well.

Once again, is this currently the state in which the extension is in or am I doing something wrong?

Thanks again!

Developer(+1)

Would be something you do - the only thing you have to mind with scripts is the matching argument count (see documentation for live_call, live_call_ext. Also, for clarity, any GMLive-specific code error messages (suppose your script throws up an error and that's why it's not doing anything) will go into the Output window.

(2 edits)

Ah, I see. I was using the wrong function with scripts. Thanks for pointing that out!

Deleted 5 years ago