It is expecting a semicolon at the end of both of those line, because they are If statements. Which answers your second question, the -> indicates to E1 If A==1 then (->) Z=1
So...
A==1 -> Z=1;
B==1 -> Z=-1;
That should validate.
Even though I know that the Bi-accumulator basically does this, I would like to figure out what is wrong with this expression. When I tryed to validate it, it said unexpected symbol at line one ; . Plus I would like to know what -> means anyway, becuase garrysmod.com's wiki did not explain that symbol. Thank you.
INPUT A B
OUTPUT Z
A==1 -> Z=1
B==1 -> Z=-1
It is expecting a semicolon at the end of both of those line, because they are If statements. Which answers your second question, the -> indicates to E1 If A==1 then (->) Z=1
So...
A==1 -> Z=1;
B==1 -> Z=-1;
That should validate.
Well it works but I'm trying to get hoverballs to go up and down based upon the output of a adv. pod controller wired to an or any gate and another with a negate gate. In this instance
INPUT A B
OUTPUT Z
A==1 -> Z=1
B==1 -> Z=-1
it malfunctioned and when I used W it went up and didnt stop even when i let go of W. So I rewrote it so it looked like this.
INPUT A B
OUTPUT Z
A==1 -> Z=1;
B==1 -> Z=-1;
A==0 -> Z=0;
B==0 -> Z=0;
When I used this, it allowed me to validate it, but the hoverballs didnt move at all when i pressed W or S. Any suggestions?
A==1 -> Z=1;
B==1 -> Z=-1;
A==0 -> Z=0;
B==0 -> Z=0;
When you push A , B is still 0. So B==0->Z=0; Resets it to 0 again.
A==1 -> Z=1;
B==1 -> Z=-1;
!A&!B->Z=0;
That will work.
It says in human; If A is NOT pressed AND B is NOT pressed THEN Z=0
Ps. Thanks for adjusting your write-style. Highly appreciated.
Personally, what I do for something like that is:
Where A and B are the two keys on the controller, and Z is wired to the first input of the hoverball.Code:Inputs: A B Output: Z Z = (A -B)
That way, if nothing is hit, or both are hit, you get Z = 0. If you hit A it outputs 1, B outputs -1.
And yes, mad props on the improvement.
<Anticept>Will sex for food.
<Beer>peanus, I like that
<nath2008uk>I must play with black peanus
<Jat Goodwin>i like the underage one
<Black Phoenix>He's a good pedo
O lord I'm an idiot guys. I figured out what the problem was, it works perfectly now, but thanks for all the help and support.
Bookmarks