Theaset Posted October 30, 2018 Share Posted October 30, 2018 For some reason the instance_create_layer() and instance_create_depth() functions do not seem to work at all for me on HTML5. They work fine when testing on OS. It does not seem to matter whether I call the layer by name like this: instance_create_layer(x,y,"Player",Object); or with built in variables like this: instance_create_layer(x,y,layer,Object). But both ways work on OS. I checked the debug console on the browser and the error I get is this: "Error: Trying to create an instance on a non-existant layer." I don't understand why that error is happening, since I am naming layers I know already exist, or I am calling the layer ID directly with the "layer" built-in variable. And since the exact same code works on other platforms... There is also a Source Mapping error warning, that could be related, but I don't know: Source map error: request failed with status 404 I really need this functionality for my game, so if anyone has any insight into why these functions are not working on HTML5, and what I can do to fix it, I would really appreciate it. (I am using GameMaker Studio 2.2, in case that matters.) Quote Link to comment Share on other sites More sharing options...
Sublantis Posted November 22, 2018 Share Posted November 22, 2018 Hi, Did you ever manage to resolve this issue. Currently getting the same error when exporting to HTML5 with GameMaker Studio 2. Check out my attached screen shot is it the same problem you had? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.