Hello guys!
I dont know if my title is clear, but I'm making a mobile game where the player follows wherever the "mouse" is being held down. The problem is that he needs to press a button to pick up items, and I cant seem to make it work on mobile. The game is something like this:
And the code is something like this:
Thanks in advance!
I dont know if my title is clear, but I'm making a mobile game where the player follows wherever the "mouse" is being held down. The problem is that he needs to press a button to pick up items, and I cant seem to make it work on mobile. The game is something like this:
And the code is something like this:
GML:
//Player movement
if(mouse_check_button(mb_left) && position_meeting(mouse_x, mouse_y, obj_floor)){ //Floor is the grey area
//Move
}
//Pick up items
if(mouse_check_button_released(mb_left) && position_meeting(mouse_x, mouse_y, obj_button)){
//Pick up
}