I was trying to buid something that predicts where it should shoot to hit the enemy, i have tried using a simple script that looked like this
var i = instance_nearest;
var di = point_direction(x,y,i.x,i.y);
var dist = point_distance(x,y,i.x,i.y);
time = dist/bulletspeed;
alpha = i.direction -...