Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

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

[Solved] Help setup live room

A topic by Feel created Nov 27, 2019 Views: 364 Replies: 5
Viewing posts 1 to 4
(1 edit)

Hi !

I feel stupid, i try to follow the doc https://yal.cc/r/17/gmlive/ but ... this is not working, i'm noob, so there is 99% the error come from me ^^.

If someone can help me to configure that correctly .. :)

When i made a change in my room editor, the update is send to the console "Updated rmWorldTest" but my room keep the same.

I think it's https://yal.cc/r/17/gmlive/#live_room_updated that I did not understand well, 

i've put this : 

live_room_updated = scr_room_updated(rmWorldTest);
(this is the script)
///@arg room
room_goto_live(argument0);

in the create event of obj_gmlive, i tried to put in the step event, but the game wont start.

Another thing, i tried some mystic manipulation (haha) and if i do this : (still in the create event of obj_gmlive)

live_room_updated = scr_room_updated;

i have a BUNCH a error in output window, BUT, when i make change in the room editor, it's updated in the game, but all game is like, freezing.

[live][13:59:25] Runtime error: oCamera:Step_0[L7,c8] `100024` (oCamera) does not have a variable `mode`
[live][13:59:25] Runtime error: oCamera:Step_0[L7,c8] `100035` (oCamera) does not have a variable `mode`
[live][13:59:25] Runtime error: oPlayer:Step_0[L20,c9] `100025` (oPlayer) does not have a variable `wlkspd`
[live][13:59:25] Runtime error: oGameManager:Step_0[L10,c4] `100023` (oGameManager) does not have a variable `older`
[live][13:59:25] Runtime error: oGameManager:Step_0[L10,c4] `100034` (oGameManager) does not have a variable `older`
[live][13:59:25] Runtime error: oCamera:Step_0[L7,c8] `100024` (oCamera) does not have a variable `mode`
[live][13:59:25] Runtime error: oCamera:Step_0[L7,c8] `100035` (oCamera) does not have a variable `mode`
[live][13:59:25] Runtime error: oPlayer:Step_0[L20,c9] `100025` (oPlayer) does not have a variable `wlkspd`

thanks for reading !

Developer

You indeed want to change this

live_room_updated = scr_room_updated(rmWorldTest);

to just 

live_room_updated = scr_room_updated;

because you are letting GMLive know which script to call (via script_execute) when a room updates.

It's hard to tell more about the errors without context.

(1 edit)

Hi, thanks for reply, that what i tought first, but spammed me a bunch of error.

I tried with a new blank project, GMLive + One object (witout event) that i put in the room editor, and it's work, i dont know why it isnt working with my previous project ...

Later : Ok, so, when i add an object with other event than the create one. the game crash.

ERROR!!! :: ############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object oRep:
Variable oRep.col(100026, -2147483648) not set before reading it.
 at gml_Object_oRep_Draw_0 (line 2) - image_blend=col;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_oRep_Draw_0 (line 2)

and this is the object create :

col = make_color_rgb(100, 120, 130);

If i add another event, like draw, step etc ...

the game crash.


Edit : if i add 

if (live_call()) return live_result;

i have a lot of 

[live][17:41:52] Runtime error: oRep:Draw_0[L3,c15] `100039` (oRep) does not have a variable `col`

in the Output

i made a little video to show what happen

https://drive.google.com/file/d/1KFYg3QhPMVdabZHaG8O31-gkSkDl1HSY/view?usp=shari...

Developer

If you are live-coding a Create event, the new version will only take effect the next time the instance is created - otherwise GMLive would have to figure out which variables were added/renamed/removed, which is a whole different can of worms, moreso if you have conditions/loops inside the event. You can force-execute create event from Step via event_perform(ev_create, 0)

hmmm soooo, i cannot mapping and playing in same time for trying jumps in 2D platformer for exemple ?

(thanks for the event_perform trick, can be usefull :))