A
Animo Tree
Guest
Right now I am working on a project, were if you click on an object on screen it will appear in your inventory on the corner of the screen. Here's my code...
if mouse_check_button(mb_left) and position_meeting(mouse_x, mouse_y, self){
for (var b = 0; Invintory_Box != 0; b++){
Invintory_Box = self
x = 423 + b
y = 702
}
}
The problem is, is that when you click on an object the code doesn't seem to run, instead the objects just stay where they are. The mouse_check_button action seems to be working, it's just the mouse collision doesn't seem to work. Any thoughts on how to fix it?
if mouse_check_button(mb_left) and position_meeting(mouse_x, mouse_y, self){
for (var b = 0; Invintory_Box != 0; b++){
Invintory_Box = self
x = 423 + b
y = 702
}
}
The problem is, is that when you click on an object the code doesn't seem to run, instead the objects just stay where they are. The mouse_check_button action seems to be working, it's just the mouse collision doesn't seem to work. Any thoughts on how to fix it?