• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

HTML5 instance_create_layer bugged on HTML5 when using layer ids

H

Homunculus

Guest
Posting here just for reference, I already reported the bug. Hopefully it can save some headache to others.

Runner version: 2.2.1.291

When exporting for HTML5,tTrying to access the built-in layer variable of a newly created instance right after instance_create_layer returns -1.

After one step, the layer can be accessed correctly.

Test case

Blank project, one room, two objects (object0 and object1):

Code:
//object0 create code
obj1 = instance_create_layer(x, y, layer, object1);
show_debug_message( string(obj1.layer) );
The above outputs -1.
 
Top