Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

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

Adding/moving objects in a room

A topic by Xerra created Sep 26, 2020 Views: 379 Replies: 7
Viewing posts 1 to 8

Only got the extension today so I'm still finding my way around. I've got it up and running doing basic stuff like changing an object variables on the fly, which is great. However, I'm also thinking that I should be able to edit the room objects as well, and the documentation does indicate this. I've been tinkering for a couple of hours now but there's only like a few sentences on this in the doc file and I can't seem to get my head around it. Also it looks a bit out of date with the changes to functions from scripts possibly.

I'm just looking to add or move objects within a room and have them updated so I can build and edit the map my player object is running around without having to constantly recompile every time I move a blocks position.

Just going to add to this that I watched the video you posted to an earlier post with basically the same issue and followed that but it ain't working for me. 

https://1drv.ms/u/s!AmFBFulY5eDxqDjIWTd-yIIUbwPX?e=t4xX9x

Sorry, can't grab the text out of the error box from gms 2 for some reason. That's a screenshot.

It looks to be crashing in my function for updating the room which I set up based on the script you create in your video.

function roomUpdated() {
room_goto_live(argument0);
}

This is what I have added to the obj_gmlive Create event:

#macro live_enabled 1

// change IP/port here if you connect to remote gmlive-server:
live_init(1, "http://localhost:5100", "");

// Tony stuff
live_blank_object = objBlank;
live_blank_room = Blank;
live_room_updated = roomUpdated();
room_set_live(Level1, true);

Developer

You are yet another victim of writing

live_room_updated = roomUpdated();

(assigning the result of calling a script) instead of

live_room_updated = roomUpdated;

(assigning the script itself)

There lies another problem. I thought that might have been an issue and tried what you suggested but now, while the game doesn't crash out with an error, it literally hangs with a spinning colour wheel before anything starts to happen, apart from the game screen being shown.

Developer

If you can reproduce this in a small-ish project, please email me (yellowafterlife@hotmail.com) a YYZ and I'll take a look.

I'll have a go at putting something smaller together to test it. Probably a bit ambitious trying it on something as big as my current project for a first attempt.

I sent a Twitter DM with a link to download a test project I made for moving/updating objects in a room. Hopefully you can see where I'm going wrong as it's not working for me. I've tried on GMS2 for both Mac and on Windows via parallels.

ahh missed you asked for an Email. I'll send that too.