[HELP] How can I draw a line between two actors in the editor?

I’m creating an AI Node Blueprint called a Search Point which can be connected to 1 or more other Search Points in the editor. These external search points are stored in an array.

However, I would like to draw lines between connected Search Points in the editor, ideally with arrows on them indicating the direction of the connection.

I’m guessing that in the construction script I need a ‘For Loop’ that goes through the Search Point array and use the Draw Line node to coonect them, however the ‘Line Trace’ function doesn’t seem right for this and I want to draw the line whenver both ends of Search Point connection are visible. The construction script will only fire off once.

Does anyone know how to handle this in the editor?

you need to draw a debug line (“Draw Debug Line” node) from each actor, if and only if they’re visible. You’ll also want to get rid of all the old lines, so that when you move one of the objects, it doesn’t simply add extra lines. You can use “Flush Persistent Debug Lines” to do this… just make sure you call it BEFORE you run through your search point array and draw new lines!

Thanks, that’s almost got it. But there are a couple of problems remaining:

It’s impossible to change the line colour
The line disappears as soon as the current frame is over

Sounds like these two will require input from Epic.

And how do I check if an object is visible onscreen / drawn?

If you want the line to persist, you need to change its lifetime. I managed to change the line colour and thickness in the BP node.

The lifetime already defaults to perminant (-1). Changing that to a finite time and changing it back to perminant have no effect.