sledge icon indicating copy to clipboard operation
sledge copied to clipboard

Rendering: Add connections between entities

Open LogicAndTrick opened this issue 7 years ago • 3 comments

Draw lines between triggers and their target entities.

LogicAndTrick avatar Oct 30 '18 08:10 LogicAndTrick

This is somewhat of a subset of the line() "behavior" in Source FGDs, since it can be configured to produce this functionallity. It'd make sense to then just synthesize the definition in GoldSource FGDs.

TeamSpen210 avatar Oct 30 '18 10:10 TeamSpen210

Interesting, I didn't know Source had behaviours for that, but it makes sense. It might just be a matter of automatically adding a line behaviour any class that has both targetname and target keys.

LogicAndTrick avatar Oct 30 '18 11:10 LogicAndTrick

The syntax is pretty customisable, it goes like line(255 255 255, targetname, target). It'll read the target keyvalue on this entity and draw a line to the first entity with the matching targetname (or whatever keyvalues you specify)? You can also add a second pair to specify the other end of the line, so it goes between two entities instead of to the current one. (Useful for say env_beam.)

TeamSpen210 avatar Oct 30 '18 11:10 TeamSpen210