I love doublepost
Also, auto weld to the wall would be a nice feature. I dont like my stuff falling off. Thanks again!
I dont like making my own clocks with a self resetting timer and a comparator. I think it'd be much more streamlined to code in a LUA clock (and by clock, I mean clock signal, not time teller)
I'd do it, but my LUA skills are no longer what they used to be (not much).
Anyway, super thanks! Also, the regular chips (counter, divider), I know they can be made with basic flip flops and latches, but it'd be smoother if they were in code.
Also, instead of the gate model, an actualy IC model would be cool, where you'd click on the pins to wire them, insead of the not noob friendly system you have now.
Other than that, fantastic mod!
I love doublepost
Also, auto weld to the wall would be a nice feature. I dont like my stuff falling off. Thanks again!
This is untested code so it prob wont work, but i'm away and have no gmod. Its and up down counter. Ur welcome to give it a try,I dont like making my own clocks with a self resetting timer and a comparator. I think it'd be much more streamlined to code in a LUA clock (and by clock, I mean clock signal, not time teller)
I'd do it, but my LUA skills are no longer what they used to be (not much).
Anyway, super thanks! Also, the regular chips (counter, divider), I know they can be made with basic flip flops and latches, but it'd be smoother if they were in code.
Also, instead of the gate model, an actualy IC model would be cool, where you'd click on the pins to wire them, insead of the not noob friendly system you have now.
Other than that, fantastic mod![/b]
Add it to wire\lua\weapons\gmod_tool\stools\wire_gate_memory .lua at the end of the file. Tell me if it works.
Code:GateActions["udcounter"] = { ****group = "Memory", ****name = "Up/Down Counter", ****inputs = { "Increment", "Decrement", "Clk", "Reset"}, ****output = function(gate, Inc, Dec, Clk, Reset) ****local lInc = (Inc > 0) ****local lDec = (Dec > 0) ****local lClk = (Clk > 0) ****local lReset = (Reset > 0) ****if ((gate.PrevInc ~= lInc || gate.PrevDec ~= lDec || gate.PrevClk ~= lClk) && gate.lClk) then ********if (lInc) and (!lDec) and (!lReset) then ************gate.countStore = gate.countStore + 1 ********elseif (!lInc) and (lDec) and (!lReset) then ************gate.countStore = gate.countStore - 1 ********end ********gate.PrevInc = lInc ********gate.PrevDec = lDec ********gate.PrevClk = lClk ****end ****if (lReset) then ********gate.countStore = 0 ****end ****return gate.countStore ****end, ****label = function(Out, Inc, Dec, Clk, Reset) ********return "Increment:"..Inc.." Decrement:"..Dec.." Clk:"..Clk.." Reset:"..Reset.." = "..Out ****end }
-----------------------------------------------
gmod addon reviews:
http://gmodreviews.googlepages.com/
Proper is now /autorun/wiregates.lua. If this works, i'll add it.This is untested code so it prob wont work, but i'm away and have no gmod. Its and up down counter. Ur welcome to give it a try,
Add it to wire\lua\weapons\gmod_tool\stools\wire_gate_memory .lua at the end of the file. Tell me if it works.[/b]
"Our death ray doesn't seem to be working. I'm standing right in it, and I'm not dead yet." - Jamie Hyneman
"Yes, managing the anonymous activity of the entire Internet is a challenge. Shoving the entire universe into a mason jar for use as a personal flashlight would also be a pesky bother." - Karl, BBR
WIREMOD WILL NOT WORK ON YOUR FACE! BUT IT DOES ON YOUR MOM :shifty:
Clock thing is actually an idea. You could set up 2 times: Frequency1 and Frequency2.
Frequency1 - width of "1" signal, frequency2 - width of "2" signal.
I'll test it next week and get back to you.Proper is now /autorun/wiregates.lua. If this works, i'll add it.[/b]
I don't completely follow, do you mean the on period and the off period or two seperate clocks in one chip?Clock thing is actually an idea. You could set up 2 times: Frequency1 and Frequency2.
Frequency1 - width of "1" signal, frequency2 - width of "2" signal.[/b]
-----------------------------------------------
gmod addon reviews:
http://gmodreviews.googlepages.com/
1 is frequency1 (width of the marked area)Code:_______******_______******____ __|****** |____|****** |____| **^_______^************ ^__^ ******1****************** 2
2 is frequency 2 (width of the marked area)
i don't see a specific application for that other then maybe a police light.
I've made a clock. On period and off period are settable via inputs. Again I havn't been able to test it, but next week I will have the tested version.
Code:GateActions["clock"] = { ****group = "Time", ****name = "Clock", ****inputs = { "Run", "On Period", "Off Period" }, ****timed = true, ****output = function(gate, Run, onPeriod, offPeriod) ****if ( Run > 0 ) then ********if (gate.State) then ************if (CurTime() >= gate.PrevTime + onPeriod) then ****************gate.State = false ****************gate.PrevTime = CurTime() ****************return 0 ************else ****************return 1 ************end ********else ************if (CurTime() >= gate.PrevTime + offPeriod) then ****************gate.State = true ****************gate.PrevTime = CurTime() ****************return 1 ************else ****************return 0 ************end ********end ****end ****return 0 ****end, ****label = function(Out, Run) ********return "Run:"..Run.." = "..Out ****end }
-----------------------------------------------
gmod addon reviews:
http://gmodreviews.googlepages.com/
What in teh fucx are you talking about? Does that have anything to do with a clock chip...?Clock thing is actually an idea. You could set up 2 times: Frequency1 and Frequency2.
Frequency1 - width of "1" signal, frequency2 - width of "2" signal.[/b]
Anyway I think this is a good idea but all it really takes is 3 chips (time, greater, value) to make atm. Not a huge timesaver.
"As far as I can remember, Garry has always had this pissy, elitist attitude towards others. "I'm better than you all." That's his philosophy. And that's why he's hated. If he had been nice and respectful in the first place, he wouldn't have a bunch of pissed-off enemies biting at his ass every chance they get."
Bookmarks