X
Xecries
Guest
hi guys.
i made this game for android but i have a problem with the player control
Step Event:
execute code:
move_towards_point(mouse_x,mouse_y-50,8);
if point_distance(x,y,mouse_x,mouse_y-50)<speed
{
direction = 0;
speed = 0;
}
The code is for the player which is constantly following the mouse. so when i created a button and put it in the room and tried to press it like shoot missile the player move toward the place that i press. How can i avoid the player to move its position when i am pressing a button. I have tried using simple code like doom mouse_click but it prevents the player unique move freely in the screen.
[/url][/IMG]
[/url][/IMG]
i made this game for android but i have a problem with the player control
Step Event:
execute code:
move_towards_point(mouse_x,mouse_y-50,8);
if point_distance(x,y,mouse_x,mouse_y-50)<speed
{
direction = 0;
speed = 0;
}
The code is for the player which is constantly following the mouse. so when i created a button and put it in the room and tried to press it like shoot missile the player move toward the place that i press. How can i avoid the player to move its position when i am pressing a button. I have tried using simple code like doom mouse_click but it prevents the player unique move freely in the screen.
Last edited by a moderator: