HTML5 Intance_create not working

S

splendidtank

Guest
The instance_create_layer function is not working my code is:
Code:
if (instance_exists(oPlayer)) && (point_in_circle(oPlayer.x,oPlayer.y,x,y,64))
{   
    nearby = true;
    if (keyboard_check_pressed(ord("Q"))) && (!instance_exists(oGunPickup)) && (!instance_exists(oGun))
    {
        image_index = 1;
        show_debug_message("wow");
        instance_create_layer(x+2,y-2,"gun",oGunPickup)
    }
}else nearby = false;
In the HTML build no oGunPickup is spawning. Works fine in the Windows build...
 

rIKmAN

Member
Does "wow" appear in the console when running the game and pressing Q?
Have you checked the browser developer console for any more in depth error messages?
 
S

splendidtank

Guest
i got "Error: Trying to create an instance on a non-existant layer" i double checked it and "gun" is a layer... ive tried to change layer many times now... Even if i try to use instance_create_depth i get the same error... I also got this:
Code:
Source map error: request failed with status 404
Resource URL: http://127.0.0.1:51264/SkogTheGame/Skog%20the%20game.js?ZHABC=1291562026
Source Map URL: inflate.min.js.map
 
Top