# Noob question

I’m sorta new to gmod, I have all the required mods (wire, phx 3) for making a timer and trigger system.

I want to make a drag strip where I could time races of some vehicles. This is going to be shown to a bunch of 6th graders learning physics and I want to be able to show three variables separately (Time, Velocity/Speed, Distance).

I know how to find speed, that was really easy. I just dont know how to make a timer that would toggle on once I pass a certain point (start of the race) and toggle off after I get to the end of the course.

I have used some variations using a simple timer tutorial and the ranger detection unit (from an auto turret tutorial). I have been able to have the timer run but only when the rangers beam is broken.

Looking from help from those more knowledgeable in gMod.

Thanks!

Two rangers, a logic gate (or (any) ) , a memory gate (Toggle (edge triggered) ) A constant value of 1, a pulser and an increment gate. Sorry I couldn’t be much more help.

I’ll try that combo

I think I have a picture of exactly what you need funnily enough.

The only wire related picture I have just happens to be what you need. Strange…

Lucky me! I will take a shot at wiring this up.

Thanks again

I might be able to code a E2 chip for this, I’ll get back to you if I ever do.

What type of timer allows me to set the rate using the constant value? The timer I am using has only Run and Reset.

Also, I am confused as to how the toggle switch is supposed to be incorporated into the circuit. I have bypassed this chip and directly connected the ‘or’ to the timer’s ‘run’, this makes the timer run only when I am breaking the beam of either ranger.

Just confused with the text on the photobucket page.

Thanks for all the help so far!

``````

@inputs Drag
@inputs On Off
@outputs Time
@persist Active
interval(100)
if (On & ~On) {Time = 0, Active = 1}
if (Active) {Time+=0.1}
if (Off & ~Off) {Active = 0}

``````

Thanks for all the help, it works great!

I also programmed an E2 chip with your code, but I don’t know how to hook it up.

THANKS AGAIN! ^o^