R
Rodimus
Guest
Hello!
I have five objects: one is a car, the other four is arrows, represent up,down,left, right. They supposed to turn the car to the respective directions. My problem begins here: I want the car EXACTLY turning, when its center is matching the arrow's center, behind it. How can I do this? Here is what I so far get:
My codes working, but not perfectly. how can I make it precise?
Thanks for any help!
I have five objects: one is a car, the other four is arrows, represent up,down,left, right. They supposed to turn the car to the respective directions. My problem begins here: I want the car EXACTLY turning, when its center is matching the arrow's center, behind it. How can I do this? Here is what I so far get:
My codes working, but not perfectly. how can I make it precise?
Thanks for any help!
spd = 30;
newdir = direction;
newdir = direction;
image_angle = direction;
repeat (spd)
{
if (direction != newdir)
{
if (x % 32 == 16 && y % 32 == 16)
{
direction = newdir;
}
}
x= x+lengthdir_x(1,direction);
y= y+lengthdir_y(1,direction);
}
repeat (spd)
{
if (direction != newdir)
{
if (x % 32 == 16 && y % 32 == 16)
{
direction = newdir;
}
}
x= x+lengthdir_x(1,direction);
y= y+lengthdir_y(1,direction);
}
newdir = other.direction;