A quick example created for a user on the Construct 2 forums. This example shows how to draw a line between 2 objects on the screen by using the distance(x1,y1,x2,y2) and angle(x1,y1,x2,y2) expressions. It uses the “Drag & Drop” behaviour but can be easily changed to suit your needs.
Advertisements
Thanks for the example! Was wondering can this be modified to work with scrolling and two objects on different layers (with different parallax values), or would that require a wholly different approach?