Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

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

working with state machines.

A topic by joseph.a.garza1@gmail.com created Dec 13, 2022 Views: 201 Replies: 4
Viewing posts 1 to 3

Hi, I'm trying to get this to work with Snowstate (a finite state machine that puts most things in the create event), and the game crashes when I try to live edit anything in the create event, saying it is out of scope. is there any way to work with this or to best use other state machines that may be compatible? thanks.

Developer

For starters, I would need the complete error message - for technical reasons I am unable to test compatibility of every single asset with mine.

complete error message attached below. thank you for the very fast response. 

___________________________________________

############################################################################################

ERROR in

action number 1

of  Step Event0

for object oPlayer:

It would appear that you've re-bound a GMLive function to a different scope. Please use live_method() rather than method() to do so.

 at gml_Script_gml_thread_method_script (line 5191) -                      if (l_pg == undefined) show_error("It would appear that you've re-bound a GMLive function to a different scope. Please use live_method() rather than method() to do so.", true);

############################################################################################

gml_Script_gml_thread_method_script (line 5191)

gml_Script_anon_SnowState_gml_GlobalScript_SnowState_9604_SnowState_gml_GlobalScript_SnowState (line 347) -               if (_args == undefined) return _func();

gml_Script_anon_SnowState_gml_GlobalScript_SnowState_9040_SnowState_gml_GlobalScript_SnowState (line 338) -               with (__owner) _pyramid(_func, _args);

gml_Script_anon_anon_SnowState_gml_GlobalScript_SnowState_4416_SnowState_gml_GlobalScript_SnowState_4532_anon_SnowState_gml_GlobalScript_SnowState_4416_SnowState_gml_GlobalScript_SnowState (line 159) -                      exec(event, undefined, _args);

gml_Object_oPlayer_Step_0 (line 6) - fsm.step()

Developer

The error tells you what to do - you’ll want to replace method function calls with live_method.

its working! thank you, I'm very new at gamemaking and programming in general, and this allowed  me to keep two very useful tools.