Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

GMRoomPack

Package GameMaker rooms and load them as you please · By YellowAfterlife

room_pack_eval_script not working with 2.3?

A topic by Kehler Creations created Sep 11, 2020 Views: 434 Replies: 7
Viewing posts 1 to 3

Since updating to 2.3, variable definitions have not been functional.
I use GMLive's built in function for this:

room_pack_eval_script = live_execute_string;

This worked fine pre-2.3, but now seems to be broken. The problem could be with either room_pack_eval_script  or live_execute_string, since both extensions have been updated for 2.3

Developer (1 edit)

Define "not working"? Is there a specific error message?

You may have to assign it in create event rather than in a global script since script init order is not determined.

By "not working" I mean the variables are always set to the default values, regardless of what I choose in the room editor. No error messages.
I have put room_pack_eval_script = live_execute_string; in the create event of a controller object, the same object that runs the rest of the GMRoomPack scripts

Developer

Can you check if there are variable assignment lines in generated JSON? If not, that's probably on me.

(1 edit)

What code should I be looking for?

I don't know exactly what to look for, but I can't seem to find anything regarding variable assignment.

This is all that I can find for each instance, at least that's what I think:

{"name":"inst_666CF5A3","x":2242,"y":442,"obj":"obj_Civilian_Employee","rotation":90.43495}

Now I find something called "propertyCode", which holds a variable created with Variable Definitions. So yes, I think what you wanted me to look for is there.

Any updates on what the problem could be?

Developer(+1)

Hello! Not yet - since I updated a handful of my extensions to 2.3, there's a bit of a queue with variously mysterious issues that I'm digging through.