This article's documentation is for anything that uses the Source engine. Click here for more information.

Drawcross: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
{{This is a|console command|name=drawcross|name1=drawline}} Creates lines or crosses. Cross consists of 4 lines and there are 20 lines possible to be drawn at once (i.e. 5 crosses). The lines they draw are red if intersecting solid geometry otherwise white.
{{This is a|console command|name=drawcross|name1=drawline}} Creates lines or crosses. Cross consists of 4 lines and there are 20 lines possible to be drawn at once (i.e. 5 crosses). The lines they draw are red if intersecting solid geometry otherwise white.


{{tip|clear_debug_overlays command doesn't clear these lines but it's possible to hide them by issuing <code>drawline 0 0 0 0 0 0</code> 20 times <code>alias e "drawline 0 0 0 0 0 0";e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e</code>}}
{{tip|clear_debug_overlays command doesn't clear these lines but it's possible to hide them by issuing <code>drawline 0 0 0 0 0 0</code> 20 times  
<pre>alias e "drawline 0 0 0 0 0 0";
alias clear_debug_overlays2 "e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e"
</pre>}}


[[File:Drawcross-example-hls.jpg|right|thumb|700px|Drawcross used to show locations of {{ent|world_items|engine=source}} in {{hls|2}}.]]
[[File:Drawcross-example-hls.jpg|right|thumb|700px|Drawcross used to show locations of {{ent|world_items|engine=source}} in {{hls|2}}.]]

Revision as of 00:42, 12 May 2025

English (en)Translate (Translate)

drawcross and drawline are console commands available in all Source Source games. Creates lines or crosses. Cross consists of 4 lines and there are 20 lines possible to be drawn at once (i.e. 5 crosses). The lines they draw are red if intersecting solid geometry otherwise white.

Tip.pngTip:clear_debug_overlays command doesn't clear these lines but it's possible to hide them by issuing drawline 0 0 0 0 0 0 20 times
alias e "drawline 0 0 0 0 0 0";
alias clear_debug_overlays2 "e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e"
Drawcross used to show locations of world_items in Half-Life: Source Half-Life: Source.

Examples

  • drawcross 152 366 487
  • drawline 100 200 130 500 -650 142