J
J.J.
Guest
I have two objects (Wagon and Turret) and I want the turret attached to the wagon. I found out that lengthdir is the one to use for this. But I'm no programmer/scripter so who can help me out step for step.
x = wagon.x + lengthdir_x(wagon.image_angle + aoffset, offset);
Y = wagon.y + lengthdir_y(wagon.image_angle + aoffset, offset);
//build the transform matrix from the wagon
var mat = matrix_build(wagon.x, wagon.y, 0, 0, 0, wagon.image_angle, 1,1,1);
//transform our offsets
var o = matrix_transform_vertex(mat, xoff, yoff, 0);
//get our x and y coords
x = o[0];
y = o[1];
No, the step event.Do I put this in the creation code?