If you are after a Straight line......Create a 1 or 2 pixel square Sprite object or better yet a tiled Background object
Set its x, y position to the first object...Then set the objects width to the distance between the 2 objects and the angle to the other objects x,y position(use image points x,y for accuracy)
Below I have included a simple demo of how to do it one way..there are most likely plenty of other ways..
Just Drag either object to see the line appear
A line between 2 objects
https://www.dropbox.com/sh/2lmy1a0t8galurf/AAAm6isv0mjZqRMOY_FA4Zh7a?dl=0