Garry's Mod

Garry's Mod

Not enough ratings
AndrewEathan's Guide to Console Screens (Wiremod) (Expression2)
By andreweathan
This guide will help you code Console Screens with Expression2.
There isn't much to console screens, so this guide will be short unlike the EGP guide.
   
Award
Favorite
Favorited
Unfavorite
Introduction to Console Screens
BEFORE STARTING...
Make sure to have a input wirelink.
Example:
@name Test
@inputs Scr:wirelink

"Scr" can be anything.
Wire the wirelink input to the console screen, and you're done with step 1.



Console Screens are a type of wiremod display screens which can be scripted, the other one being EGP v3. Using expression2 to script the screens might be more difficult than CPU but it's a better reliable way of doing so.

This display screen can be used with the Expression 2 gate and CPU chip.
How console screens work and how to use them
Console Screens have minimum to maximum pixel addresses. 0-29 for X (Horizontal) and 0-17 for Y (Vertical).
All that is required to write to a screen is one line of code.
Scr:writeString(S,N,N,[N1,N2],[N3])
(Squared paranthesis are extra args.)

S is a string, which is going to be the line of text which will be written on the screen.
The first two Ns are used to specify the X and Y position of the string written (0-29,0-17)
N1 is a 3 digit argument for text color (foreground). Use with 111-999. Example: 191 (Pure green).
N2 is a 3 digit argument for the background of the written string.
Use with 111-999 aswell.

N3 is used to specify whether the text should flash. Usage: 0 - 1

Now, unlike EGP objects, this is like Paint but without a eraser. You would need a 000 color format to erase a pixel.

Using console screens, people have been able to create fascinating UIs.


(2 years later)
finally decided to provide an example to this

with this simple chip, you can just paste the chip on a console screen and it'll write some text on it

@name Paste on a console screen!
@persist Scr:wirelink
if(first()){Scr=entity():isWeldedTo():wirelink()}
#writeString(Text,XCoordinate,YCoordinate,BGColor,TextColor)
Scr:writeString("Hello World!",0,0,980,101)
Scr:writeString("According to all known laws of aviation, a bee should not be able to fly.",0,1,980,101)

Finish
Hope you liked the guide!
Check out my guide on the EGP v3 screen.
7 Comments
andreweathan  [author] Sep 23, 2020 @ 4:24am 
np, my bad for forgetting
barquinha™ Sep 22, 2020 @ 11:23am 
Thanks!
andreweathan  [author] Sep 22, 2020 @ 3:57am 
forgot this existed, i might aswell polish it up now
barquinha™ Sep 21, 2020 @ 3:33pm 
and OP never added images.
andreweathan  [author] Jul 25, 2018 @ 10:37am 
I'll add pictures later.
W3irdP3r0 Jul 25, 2018 @ 6:38am 
Where is a pictures???
andreweathan  [author] Jul 25, 2018 @ 1:27am 
Did a edit at the console screen functionality sector.