Quantcast
Channel: Active questions tagged game-maker - Stack Overflow
Viewing all articles
Browse latest Browse all 189

instance_create_layer won't recognize a layer that IS created

$
0
0

I'm using Gamemaker studio 2 and I am fairly new keep in mind but I am fairly certain this isn't a problem on my side. I've been watching a youtube series on creating my first game using GML and my code looks EXACTLY like his and is not working.

if (mouse_check_button(mb_left)) {    instance_create_layer(x, y, "Layer_Bullet", obj_bullet);}

This is where I'm getting an error. The error says:

##############################################################FATAL ERROR inaction number 1of  Step Event0for object obj_player:instance_create_layer :: specified layer "Layer_Bullet" does not exist at gml_Object_obj_player_Step_0 (line 11) -        instance_create_layer(x, y, "Layer_Bullet", obj_bullet);##############################################################--------------------------------------------------------------------------------------------stack frame isgml_Object_obj_player_Step_0 (line 11)

I have checked nearly 3000 times (exaggerated obviously) to make sure that the spelling is correct. I've renamed the layer, tried using a different layer. Nothing works.


Viewing all articles
Browse latest Browse all 189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>