I DID NOT KNOW WERE TO PUT THIS SO I THOUGHT I'D PUT IT HERE!
Hello How I make an expression 2 that if an input goes on a specific value it displays it on a console screen? And I also want to know how to make an input to clear the screen.
[code]
@name BCSID
#Basic Console Screen Input Device, by DeathDoom
@inputs Screen:wirelink Input Value Clear
@persist
interval(20)
if(Input == Value
) {Screen:writeString(Value + "",0,0)}
if(Clear & ~Clear
) {Screen[2039] = 0}
[/code]
When Input is the same as Value, then the screen will display the value of Input in the upper-left hand corner.
ALSO: Don't forget to create & wire a Wirelink between the console screen and the Expression chip.
You've got a very wierd way of writing ifs.
You also don't need an interval.
And why do you need two inputs (Input and Value)?
Shouldn't 2039 be 1 to clear the screen?
[code]@name BCSID
#Basic Console Screen Input Device, by DeathDoom. Modified by Divran
@inputs Screen:wirelink Input Clear
if (~Input) {
Screen:writeString(Input + "",0,0)
} elseif (~Clear) {
Screen[2041] = Clear
}[/code]
I thought it was 2041 for clear.
[QUOTE=whosdr;21811297]I thought it was 2041 for clear.[/QUOTE]
Yeah it's 2041. Edited code.
[QUOTE=DeathDoom;21806467][code]
@name BCSID
#Basic Console Screen Input Device, by DeathDoom
@inputs Screen:wirelink Input Value Clear
@persist
interval(20)
if(Input == Value
) {Screen:writeString(Value + "",0,0)}
if(Clear & ~Clear
) {Screen[2039] = 0}
[/code]
When Input is the same as Value, then the screen will display the value of Input in the upper-left hand corner.
ALSO: Don't forget to create & wire a Wirelink between the console screen and the Expression chip.[/QUOTE]
And how do i do that?
[editline]09:49AM[/editline]
nvm i figerd it out
Sorry, you need to Log In to post a reply to this thread.