KungFuChowder
Member
As my game has gotten more complicated I have been posting less on this forum because of how difficult it is to explain my problems. However, I think someone might be able to help me with this and I can explain it easily.
I have a navigation system in the step event that is making the ship's angle point towards the mouse.
And in a key pressed event for the letter "T" I have a code that I believe will make the ship move towards the coordinates I have coded as the docking point.
But the navigation controls are overriding this docking code...because they are on the step event.
But how do I make it so that when the "T" button these navigation controls are overridden?
Create Event:
global.isDockedx = obj_base.x + 145;
global.isDockedy = obj_base.y + 0;
Key Pressed "T":
image_angle = !point_direction(x, y, mouse_x, mouse_y);
if point_distance(x, y, obj_base.x, obj_base.y) <250{
move_towards_point(global.isDockedx, global.isDockedy, 1);
image_angle = obj_base.direction;
if point_distance(x, y, global.isDockedx, global.isDockedy) <5{
speed = 0;
}
}
if point_distance(x, y, global.isDockedx, global.isDockedy) <= 0{
friction = 5;
}
I have a navigation system in the step event that is making the ship's angle point towards the mouse.
And in a key pressed event for the letter "T" I have a code that I believe will make the ship move towards the coordinates I have coded as the docking point.
But the navigation controls are overriding this docking code...because they are on the step event.
But how do I make it so that when the "T" button these navigation controls are overridden?
Create Event:
global.isDockedx = obj_base.x + 145;
global.isDockedy = obj_base.y + 0;
Key Pressed "T":
image_angle = !point_direction(x, y, mouse_x, mouse_y);
if point_distance(x, y, obj_base.x, obj_base.y) <250{
move_towards_point(global.isDockedx, global.isDockedy, 1);
image_angle = obj_base.direction;
if point_distance(x, y, global.isDockedx, global.isDockedy) <5{
speed = 0;
}
}
if point_distance(x, y, global.isDockedx, global.isDockedy) <= 0{
friction = 5;
}