GML Objects not showing up

E

Ellys

Guest
Hi there, my sprite connecting to my object is not showing up.

The object is there as it is a button that exists and functions correctly when i click it.

I have made sure my sprites have visible checked and is in the top layer of instances above the background.

The sprites are middle centered and ive also tried other dimensions as well as making it bigger and moving it around the screen.

I've checked many forums about this topic but no cigar, usually they end with "my friend sorted it thnx" with no explanation.

Sprite:
upload_2019-9-3_14-32-23.png
Room:
upload_2019-9-3_14-33-35.png
Game:
upload_2019-9-3_14-34-38.png
 

Attachments

E

Ellys

Guest
Do you have a Draw Event? If so show the code.
I do, not for these objects though. There is a draw event inside the objects, so i'll show it as you probs know what you're talking about lol. There is nothing calling a Draw Event to show the objects oResources (green button) or oInfo (blue button) Thanks for the reply :)


CODE INSIDE oResources:

DRAW:
// Draw if global.textCreate1 = true
draw_set_font(font)
if (global.textCreate1 = true){
draw_text(170, 100, "Collect Wood")
draw_text(170, 130, "Collect Iron" )
draw_text(170, 160, "Collect Water")
draw_text(170, 190, "Collect Food")
}

STEP:
// Turn on the inerface object when clicking info, then destroy interface when clciking info
if (mouse_check_button_pressed(mb_left)) && (position_meeting(mouse_x, mouse_y, oResources)){
switch (global.create1){
case 0:
instance_create_depth(360, 240, 0, oInterface)
instance_create_depth(280, 102, -1, oPlusWood)
instance_create_depth(280, 132, -1, oPlusIron)
global.create1 +=1;
global.textCreate1 = true;
global.textCreate = false;
break;
case 1:
instance_destroy(oInterface)
instance_destroy(oPlusWood)
instance_destroy(oPlusIron)
global.create1 -=1;
global.textCreate1 = false;
global.textCreate = false;
break;
}
}

CREATE:
//Variables
global.create1 = 0;
global.textCreate1 = false;
 
Top