Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

anaanook

6
Posts
1
Topics
1
Followers
A member registered Jul 24, 2020

Recent community posts

What an odd quirk, that totally works! You are an absolute hero for tracking all this stuff and replying.

Usually GML only binds self for functions when using v = function(...){...}

So then, what I don't understand is why THIS doesn't work.

globalvar room_pack_eval_script; room_pack_eval_script =  function(_code, _context) {
    var _pg = txr_compile(_code);
    if (_pg != undefined) txr_exec(_pg);
};
function room_pack_raw_run_cc(l_ccRaw, l_ccPath) {
    room_pack_eval_script(l_ccRaw, l_ccPath);
}

Swapping the function call here, with the method version you describe does indeed fix it.  But just having the inline v=function(){} here still results in Self being unbound.  I'm still pretty new to GML, thanks for taking the time to answer!

Also just gotta say thanks for making (and supporting) all these great extensions.  TXR is crazy and the kind of thing that would give me a cold sweat just thinking of planning/building in any language.

(4 edits)

I was hitting this same problem and spent several hours debugging it. What I found is that for some reason, calling the function delegate from the global variable "room_pack_eval_script" seems to break the scoping of "self".  If you step along the function calls from the beginning of the instance being created, "self" continues to reference the instance we want to modify up until we call "room_pack_eval_script".  I was able to get it working, simply by replacing the delegate call to a direct call of the function itself.    It seems like there's no reason that it SHOULDNT work as intended, but this is likely the fault of a bug in GML.

this doesn't work:

globalvar room_pack_eval_script; room_pack_eval_script = txr_eval_script;
function txr_eval_script(_code, _context) {
    var _pg = txr_compile(_code);
    if (_pg != undefined) txr_exec(_pg);
}
//GMRoomPack.gml
function room_pack_raw_run_cc(l_ccRaw, l_ccPath) {
   room_pack_eval_script(l_ccRaw, l_ccPath);
}

this does:

globalvar room_pack_eval_script; room_pack_eval_script = txr_eval_script;
function txr_eval_script(_code, _context) {
    var _pg = txr_compile(_code);
    if (_pg != undefined) txr_exec(_pg);
}
//GMRoomPack.gml
function room_pack_raw_run_cc(l_ccRaw, l_ccPath) {
   txr_eval_script(l_ccRaw, l_ccPath);
}
(1 edit)

Definitely the corner jump!  Probably took me a dozen tries.   

edit: I just did it again and survived up there for a while.  Is there no win state LOL.. mean!

Okay.  I saw the chest open, it said friendship.  I still died.  That last jump was really nasty. 

Oh wow, let me see how you set it up

Finding it difficult to come up with a ruleset that takes a solid block and fills it with a repeating fill of tiles:

There are times with tilesets where you have larger tile 'blocks' that you want repeated?

[1,1,1,1]            [1,2,1,2]
[1,1,1,1]   =>   [2,1,2,1]
[1,1,1,1]            [1,2,1,2]

Was bummed, seemed like the kind of thing that would be possible with a rule based system.  But maybe i'm not doing it right?

Thanks!