S
S-4
Guest
hi all, im not new to gml but i havent touched it in about a year and im having trouble creating a child object.
so i have a parent button object (o_par_button) with two child button objects (o_button_green and o_button_red). im trying to create the child button objects in-game via another unmentioned object using the instance_create_depth() function, but heres the thing: if the child button objects have the parent button object assigned to them they dont even get created via said instance_dreate_depth() function (i confirmed they dont get created using instance_count), BUT if i remove the parent-child object hierarchy and copy/paste the exact same parent code back into the button objects (now WITHOUT parents), the button objects work PERFECTLY. so i know the problem is not the inherited code of parent object. it has to do something with the fact that im trying to instance_create_depth() an object that has a parent. is this not allowed? what am i doing wrong? all suggestions appreciated thanks all, from area S-4!
so i have a parent button object (o_par_button) with two child button objects (o_button_green and o_button_red). im trying to create the child button objects in-game via another unmentioned object using the instance_create_depth() function, but heres the thing: if the child button objects have the parent button object assigned to them they dont even get created via said instance_dreate_depth() function (i confirmed they dont get created using instance_count), BUT if i remove the parent-child object hierarchy and copy/paste the exact same parent code back into the button objects (now WITHOUT parents), the button objects work PERFECTLY. so i know the problem is not the inherited code of parent object. it has to do something with the fact that im trying to instance_create_depth() an object that has a parent. is this not allowed? what am i doing wrong? all suggestions appreciated thanks all, from area S-4!