Master Cabalist
Member
Hi everyone,
I'm trying to make a simple menu. It is the unlock menu for getting access to the bat you click on. Maybe this is easier to post in code:
BatsFaceBHiddenB: Step
BatsFaceBHiddenB: Draw
So, the above. That set of draw commands displays the menu. So I tried adding the
so it is like above. So, the "50" doesn't show up. I deleted the first line as a test and when I run that with the malformed "Unlock" and there was no effect. So it must be somewhere else
in the code since changing the block of code doesn't change anything. So I thought to myself, maybe I have two copies of that code block. So I did a search for "Unlock" in the code and
only one showed up in the results. So where is this phantom menu? Ideas?
I'm trying to make a simple menu. It is the unlock menu for getting access to the bat you click on. Maybe this is easier to post in code:
BatsFaceBHiddenB: Step
GML:
if mouse_check_button(mb_left)
{
//turn on menu
if position_meeting(mouse_x, mouse_y, BatsFaceHiddenB)
{
//below doesn't execute
show_debug_message("position meeting")
//below doesn't execute
show_debug_message("mouse check button")
//Player.hasbatB = true;
hasbatB = false
query_batB = true;
}
//Unlock prompt? Below
//clicked yes
if mouse_check_button(mb_left)
{
//below yes clicked
if (mouse_x > 304 && mouse_y > 637 && mouse_x < 477 & mouse_y < 717 && query_batB)
{
//Yes selected
show_debug_message("query bat yes selected"); //successful
//replace bat face to unlocked version
global.select_bat = 2; //the bat to drop
Player.hasbatB = true;
query_batB = false;
instance_create_depth(x, y, -1900, BatsFaceB)
instance_destroy()
}
else if (mouse_x > 304 && mouse_y > 746 && mouse_x < 477 && mouse_y < 809 && query_batB)
{
show_debug_message("query bat no selected")
query_batB = false;
}
}
}
BatsFaceBHiddenB: Draw
Code:
draw_self()
//show_debug_message("Draw Self test")
draw_set_font(SmallChancery)
if (query_batB == true && Player.hasbatB != true)
{
draw_text_ext_transformed_colour(350, 550, "Unlock this bat?", 5, 300, 1, 1, 0, c_red, c_red, c_red, c_red, 1)
draw_text_ext_transformed_colour(350, 650, "Yes?", 5, 300, 1, 1, 0, c_red, c_red, c_red, c_red, 1)
draw_text_ext_transformed_colour(350, 750, "No!", 5, 300, 1, 1, 0, c_red, c_red, c_red, c_red, 1)
//draw_text_ext_transformed_colour(550, 650, "50", 5, 300, 1, 1, 0, c_red, c_red, c_red, c_red, 1)
draw_text_transformed_colour(550, 650, "50", 1, 1, 0, c_white, c_white, c_white, c_white, 1);
//if (!instance_exists(GemPack1))
//{
// instance_create_depth(450, 650,-2000, GemPack1)
// }
}
draw_text_transformed_colour(550, 650, "50", 1, 1, 0, c_white, c_white, c_white, c_white, 1);
so it is like above. So, the "50" doesn't show up. I deleted the first line as a test and when I run that with the malformed "Unlock" and there was no effect. So it must be somewhere else
in the code since changing the block of code doesn't change anything. So I thought to myself, maybe I have two copies of that code block. So I did a search for "Unlock" in the code and
only one showed up in the results. So where is this phantom menu? Ideas?