K
KitKatarine
Guest
Hello! I hope I'm posting in the right place.
I have a problem regarding getting an object to remain visible when I click the mouse.
This is currently the code I'm working with in the "STEP" event of obj_player:
Which does this (the button just appears when I click LMB, but disappears instantly).
What I want is for the button to remain up until I click it or elsewhere, and no amount of Googling has given me an answer.
How do I get the button object to stay up?
(Also, if anyone can answer as to why it doesn't work when the player, tree, and button objects are all at different depths, that would be superb.)
Thank you so much!
I have a problem regarding getting an object to remain visible when I click the mouse.
This is currently the code I'm working with in the "STEP" event of obj_player:
Code:
///Left Mouse Button Commands (
//Check for the LMB
if mouse_check_button(mb_left)
{
with instance_nearest(mouse_x, mouse_y, obj_tree) //Find the nearest object to create sprite on top of
{
instance_create(x,y-96, obj_cut); // create instance of obj_cut
}
}
What I want is for the button to remain up until I click it or elsewhere, and no amount of Googling has given me an answer.
How do I get the button object to stay up?
(Also, if anyone can answer as to why it doesn't work when the player, tree, and button objects are all at different depths, that would be superb.)
Thank you so much!