Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

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

Useful tips for beginners?

A topic by daar created May 07, 2018 Views: 448 Replies: 1
Viewing posts 1 to 2
(1 edit)

So I just got this program and I already love it! But I feel like I have more to learn. I would love examples in the documentation on useful ways to use this extension. 
Right now I put 

if (live_call()) return live_result;

in a script and edit it during the game and when I'm done I remove that line of code. I know there are other functions but I'm not sure how they would be useful to me.  For example I was left wondering: "Why would I add arguments to live_call?"

Developer(+1)

As per documentation, if your script uses argument0 and argument1, you pass them to live_call (otherwise live-reloaded code would show an error due to not knowing their values); live_call_ext is used for scripts that take a varying number of arguments.

live_defcall/live_defcall_ext are used if you need the system to return a specific value if your updated code has compilation/runtime issues - e.g. if you are making changes to a script that returns a string, you might want it to still return some blank/"error" string even if you temporarily mess up something (to avoid non-"live" code throwing an error and closing the game).