LogicAndTrick / sledge

An open source alternative to Valve's Hammer Editor for the Goldsource engine. (No longer in development)
https://logicandtrick.github.io/sledge/
BSD 3-Clause "New" or "Revised" License
302 stars 84 forks source link

Rendering: Add connections between entities #284

Open LogicAndTrick opened 6 years ago

LogicAndTrick commented 6 years ago

Draw lines between triggers and their target entities.

TeamSpen210 commented 6 years ago

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.

LogicAndTrick commented 6 years ago

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.

TeamSpen210 commented 6 years ago

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.)