T
tiberionx
Guest
Hello again friendly people!
so im trying to do that r-type thing where you can launch an object and call it back
so i can launch the object to the right properly no problems , but when i call it back it just pops in front of the player instantly
so im trying to do that r-type thing where you can launch an object and call it back
GML:
// Create
launch_ = false;
stick_ = true;
distance_x = 50;
distance_y = 0;
sticky_ = .05;
//Step
var launcher = keyboard_check_pressed(ord("H"));
if stick_ == true {
x = o_ship.x+48;
y = o_ship.y;
} if stick_ == false {
x = lerp(x, o_ship.x + distance_x, sticky_);
y = lerp(y, o_ship.y + distance_y, sticky_);
}
if launcher && launch_ == false {
launch_ = true
alarm[0] = 1;
distance_x = 1000
} if launcher && stick_ == false {
stick_ = true;
alarm[1] = 1;
distance_x = 48;
}
// Alarm [0]
move_towards_point(distance_x, y, 10)
launch_ = true;
stick_ = false;
distance_x = 500
// alarm [1]
move_towards_point(distance_x, y, 2)
launch_ = false;