lengthdir_y
From ENIGMA
Trigonometric function
Notation
lengthdir_y(len,dir)
Description
This function is very useful. It gives you the far y coordinate of a vector. Generally used with its brother function lengthdir_x().
Parameters
int length: The distance between the calling objects y and the desired y. int direction: The direction in degrees between the calling objects y and the desired y.
Return Values
int y: this is the desired y coordinate.
Example Call
//move_to_contact_with(obj, dir)
var dx,dy, dir, obj;
dir = argument1;
obj = argument0;
while(!place_meeting(x,y,obj)){
dx = lengthdir_x(1, dir);
dy = lengthdir_y(1, dir);
x = x + dx;
y = y + dy;
}
var dx,dy, dir, obj;
dir = argument1;
obj = argument0;
while(!place_meeting(x,y,obj)){
dx = lengthdir_x(1, dir);
dy = lengthdir_y(1, dir);
x = x + dx;
y = y + dy;
}