Armor Recharger - Collect your own Armor Recharger unit!

Hey guys, this is an Armor Recharger script that I’ve been scripting/messing/playing around with.

[release]
Features:

  • 3 Parts of an Armor Recharger, each has 3 levels.
  • A Crate SENT to put your Armor Recharger parts in
  • The longer your Armor recharges, the faster it will recharge
  • You can change any part, any time
  • You can drop any part, any time
  • No Networked ints/floats/etc., this addon works entirely on metatables (and as Kogitsune said, tons of metatables = 1 NWInt/etc.)
  • Tested in multiplayer with 7 people

FAQ:

Q:How do I install this?

A:Unpack to addons (make sure there isn’t another ‘Armor Recharger’ folder inside an ‘Armor Recharger’ folder first!)

Q:How do I use this?

A:First you have to spawn 3 parts of an Armor Recharger (Capacitor, Recharger, Recharger Controller), all of these parts have 3 levels (1 - 3 from the worst to the best).
When you collect your Armor Recharger, you have to make sure that the server has the script enabled (admins can enable it by writing arm_toggle into their
console). If the script is enabled on the server, and you have all three parts, you will need to write arm_activate into your console, if you need more help, write arm_help

Q:What’s the Crate SENT for?

A:For stuffing the parts of an Armor Recharger in there, first spawn the crate, then spawn the parts and make the box collide with the parts, as soon as it touches the parts,
the parts will get inside the box, press your USE key to break the crate and take all the parts that you’ve put inside it, or give the crate to someone.

Q:What are the “specifications” on the parts?

A:Capacitors:
LEVEL 1:
Max. 110 armor points

LEVEL 2:
Max. 130 armor points

LEVEL 3:
Max. 160 armor points

Rechargers:
LEVEL 1:
1 Armor point per recharge sequence

LEVEL 2:
2 Armor points per recharge sequence

LEVEL 3:
3 Armor points per recharge sequence

Recharger Controllers:
LEVEL 1:
Starting recharge delay - 0.6 second (gets reset every time you receive damage)
Recharge delay after receiving damage - 6 seconds
Recharge delay decrease per recharge - 0.004 second

LEVEL 2:
Starting recharge delay - 0.55 second (gets reset every time you receive damage)
Recharge delay after receiving damage - 5.5 seconds
Recharge delay decrease per recharge - 0.008 second

LEVEL 3:
Starting recharge delay - 0.5 second (gets reset every time you receive damage)
Recharge delay after receiving damage - 5 seconds
Recharge delay decrease per recharge - 0.012 second

Changelog:

1.25:

  • Added descriptions to every entity
    /\ Fixed Auto-Regen script conflicting with Armor-Regen when your armor recharger is turned on (after taking fall damage your health regen wouldn’t get delayed)
    /\ Fixed recharge rate being the same recharge rate after turning off your Armor Recharger and on (i.e. 0.2 sec. regen rate would stay 0.2 after turning it off and then on, while it was supposed to be 0.5/0.55/0.6 (based on your Recharger Controller level) sec. rate)
    /\ Fixed part equip (not replace) sound working only on Energy Capacitor LVL1.
    /\ Increased Energy Capacitors’ capacity (LVL1 - 110; LVL2 - 130; LVL3 - 160)
    /\ Changed the spawnicon of Armor Recharger Sets

1.2:

  • Added in Full Armor Recharger Sets
  • Taking parts/full sets will now emit a sound
    /\ Fixed Energy Recharger popping out of the Crate up when opening it if there were 3 items inside that Crate
    /\ Fixed anti-use-spam working incorrectly

1.1:
/\ Fixed the player being able to change his Armor Recharger parts while it was still turned on

Credits:
Main stuff:
LEETNOOB

Testers:
>:3
[BCC] John Greene
Joe BL00dField |ŦƒŲ|
Robse
+[SP]+ St. Hetfield
Colonel Cluster Fuck
DeddeJ

[/release]

YouTube Video:

http://www.garrysmod.org/img/?t=dll&id=91768

Post your ideas/suggestions.

Thats pretty cool.

Thanks, have you tried it out?

Not yet, as Im playing Team Fortress 2.
Ill test it later today.

Dispenser-like chargers for Gmod?
ENGINEER! Upgrade the charger!

I found it really useful. The only minus side is the slowness of picking up everything and then activating trough the console. That takes a while and might just give your opponents enough time to end you. Its a good thing when in multiplayer, but in my opinion you should make admin only “Complete Packs”, so you dont need to pick everything up individually when playing Singleplayer.

It’s an anti-use-spam protection system I made.

Hey, that’s a good idea, I might add this in.

Still, I found another bug and I’m going to fix it.

[editline]05:26PM[/editline]

Update’s here,

What’s new?
1.1:
/\ Fixed the player being able to change his Armor Recharger parts while it was still turned on

http://www.garrysmod.org/img/?t=dll&id=89108

Also, If you would bother, you could make 2 more recharger types, like health and ammo?

Umm, but the script is about armor rechargers? Health would be quite a nonsense (even though it’s HL2 universe) and ammo would be a little stupid too.

But, what the heck, I guess I can add this (even though it’s going to be stupid).

We have AKs that shoot babies, .357 Magnums that shoot melons that turn people into melons. We have lots of dumb stuff. Its not like anyone cares if they somehow relate to HL2.

Well, I guess that makes a solid point, alright, I’ll add those generators in.

Ammo generators will have to wait, meanwhile, I’ve released an update.

1.2:

  • Added in Full Armor Recharger Sets
  • Taking parts/full sets will now emit a sound
    /\ Fixed Energy Recharger popping out of the Crate up when opening it if there were 3 items inside that Crate
    /\ Fixed anti-use-spam working incorrectly

Link:

[editline]6:59PM[/editline]

Oh fuck, I accidently bumped it.

FANTASTIC! I’ve always like regenating shields. Make it halo-style please.

Um, I’m afraid I’ve played halo a long time ago and can’t remember what it’s like in halo, can you remind me please?

Its like Halo already, as in Halo it takes a few seconds before it starts recharging.

Sorry for the bump, but I’ve released an update, link:

http://www.garrysmod.org/img/?t=dll&id=91768

Changelog:

1.25:

  • Added descriptions to every entity
    /\ Fixed Auto-Regen script conflicting with Armor-Regen when your armor recharger is turned on (after taking fall damage your health regen wouldn’t get delayed)
    /\ Fixed recharge rate being the same recharge rate after turning off your Armor Recharger and on (i.e. 0.2 sec. regen rate would stay 0.2 after turning it off and then on, while it was supposed to be 0.5/0.55/0.6 (based on your Recharger Controller level) sec. rate)
    /\ Fixed part equip (not replace) sound working only on Energy Capacitor LVL1.
    /\ Increased Armor Capacitors’ capacity (LVL1 - 110; LVL2 - 130; LVL3 - 160)
    /\ Changed the spawnicon of Armor Recharger Sets