Wiremod

So, I’m a complete noob with wiremod. My experience is pretty much limited to making buttons. I need some advice on how to make a simple timer device with a preset time and a graphical output in % (increasing) so that when I fire my weapons I can have a screen showing the time until they recharge
Help would be incredibly appreciated.

I agree wiremod is really hard to use.

wiremod easy to use
but hard to start… very hard

First you would need to know the weapons’ recharge time (look in the lua files maybe?), then you could either use Expression 2 or normal chips.
For normal chips:

— Spawn:
1 Or gate
1 Toggle gate
1 Equal gate
1 Smoother gate
1 Screen
1 Button (Non-toggle, onvalue 1, offvalue 0)
1 Constant Value (Nr of values: 3, Value 1: Weapon recharge time in seconds, Value 2: 1, Value 3: 10000)
1 If, Then, Else

— Wire:
Or:
A of Or to Button (The same button you use to fire the weapon with prefferably)
B of Or to Equal

Equal:
A of Equal to Constant Value, Value nr 1
B of Equal to Smoother

Toggle:
Clk of Toggle to Or
Onvalue of Toggle to Constant Value, Value nr 1 (Weapons recharge time in seconds)
Offvalue of Toggle to nothing (leave it unwired)

Smoother:
A of Smoother to Toggle
Rate of Smoother to If Then Else

If Then Else:
A of If Then Else to Toggle
B of If Then Else to Constant Value, Value nr 3 (10000)
C of If Then Else to Constant Value, Value nr 2 (1)

Screen:
A of Screen to Smoother


UNTESTED!

but should work. This is not exactly what you asked for. This will count DOWN instead of up with %.

Thanks a ton, I’ll try that out when I get the opportunity to.

I tried what you suggested. It did not work, unfortunately. after setting everything up and toggling the input (I use a numpad input) the screen displayed the recharge value, but rather then counting down it remained static. (After I hit the button it showed “10” (the time i set) and did not change.)

i want to use wiremod but i can’t find it on www.garrysmod.org, so many things say they need wiremod to use them. where can i download it from?

http://www.facepunch.com/showthread.php?t=688324
Use this, and props to Divran

ON A SIDE NOTE:
holy shit edit button!

“B-but I don’t want to go through 700 more steps to make a hydraul-”

-snip-

If you just want a hydraulic, sure use normal ones. If you want a hydraulic that goes slower at first, faster, then slower that the end, and an alarm when it opens and the ability to lock the door… How about throwing in an automation in there too. And then make it only open for you and nobody else. Oh and maybe a turret that kills anyone other than you that walks up to your new automatic door.

[editline]09:01PM[/editline]

Okay I tried it myself. And you’re right. It didn’t work. So I decided to make it better. Now it counts UP like you wanted it and it works.

Here’s how to make it. Almost the same, just some small changes.

— Spawn:
1 Or gate
1 Toggle gate
1 Equal gate
1 Smoother gate
1 If, Then, Else
1 And gate
1 Not gate
1 Screen
1 Button (Non-toggle, onvalue 1, offvalue 0)
1 Constant Value

  • Nr of values: 3,
  • Value 1: 100
  • Value 2: 100 divided by the Weapon recharge time in seconds (do the math yourself - or make a Divide gate) So if it’s 5 seconds, it needs to be 20.
  • Value 3: 10000

— Wire:
Or:
A of Or to Button (The same button you use to fire the weapon with prefferably)
B of Or to the And gate

Equal:
A of Equal to Nothing (Leave it unwired. This makes it 0)
B of Equal to Smoother

And:
A of And to the Not
B of And to the Equal

Not:
A of Not to the Button

Toggle:
Clk of Toggle to Or
Onvalue of Toggle to Constant Value, Value nr 1 (Weapons recharge time in seconds)
Offvalue of Toggle to nothing (leave it unwired. This makes it 0)

Smoother:
A of Smoother to Toggle
Rate of Smoother to If Then Else

If Then Else:
A of If Then Else to Toggle
B of If Then Else to Constant Value, Value nr 2 (100 / Wpn Time)
C of If Then Else to Constant Value, Value nr 3 (10000)

Screen:
A of Screen to Smoother

[editline]09:07PM[/editline]

:siren:


**!!!!! VIDEO !!!!!**

:siren:

I just noticed you can’t see what is what in the video… And I’ve already closed Gmod :S So I took a print screen of the video (lol) so you could see.