Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Laser Pistol (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Game Content: Weapons, Scripts
Game Modes: Single Player, Co-op
Weapons: Pistol
File Size
Posted
Updated
37.354 KB
2 May @ 9:43am
9 May @ 4:45am
4 Change Notes ( view )

Subscribe to download
Laser Pistol (Vscript)

In 2 collections by kurochama
Unique Weapons with Special Features
57 items
Laser Weapon Series
8 items
Description
When making laser m60 yesterday, suddenly I remember that I ever asked a modder about a custom weapon named "laser pistol". However, it's unfortunate that for some reasons, he decided not to continue working on that project so it left me with a curiosity about what it would look like. & so, now that I'm familiar enough with laser stuffs, I decided to make that gun come true. Well, probably I'll make a new collection named "Laser Gun Series" later :D .


B: "Ok, now you're going to make some Star Wars Series in L4D2, huh? Don't tell me that you're going to transmigrate Darth Vader to L4D2 world too..."
A: "Probably that's a good idea, heheheheheh...!"


List of features available on "laser pistol.txt" cfg file:
  1. Laser Pistol User: Which type of survivor can use this feature (bots/ players/ all).

  2. Laser Pistol Damage: How much the damage per 0.2 second is. Minimum damage is 1, max is no limit.

  3. Laser Extra Effect When Hit: When enabled, the laser triggers a special effect when it hits a zombie. The value controls the type of effect.

  4. Burning Laser: When enabled, the laser burns zombies.

  5. Laser Pistol Shot Chance: The chance for the laser triggered on each shot. It has 1 second of cooldown before the next laser is shot. Min value= 0 (basically a normal m60 lol), max= 100 (100% chance on each shot)

  6. Laser Color: This consists of 3 different numbers representing RGB colors. All 3 numbers must be filled in order to prevent unwanted bugs on the laser color, & the formats must be like the examples below. Examples:
    LaserColor= 255 0 0 (Red Laser).
    LaserColor= 255 255 0 (Yellow Laser).
    LaserColor= 255 50 0 (Orange Laser).
    LaserColor= 255 0 255 (Purple Laser)
    Etc...


Mechanisms of "Laser Pistol":
  • The laser shot is triggered when shooting with pistol.

  • The chance for laser shot is controlled by "Laser Pistol Shot Chance". It has 1 second of cooldown before the next laser shot. For examples, if you set the value to 10, m60 has 10% to fire a laser shot during shooting. if you set it to 100, each shot has 100% chance to trigger laser shot, but it has 1 second of cooldown for each laser shot (if you keep shooting with this 100% chance, you basically have a pistol that keeps shooting laser nonstop).

  • When triggered, the laser is active for 1 second & deals damage every 0.2 second (total of 5 damage hits in 1 second). When still active, laser will follow player's crosshair. Pistol fire rate will be greatly reduced when laser shot is triggered, & can shoot again after the laser shot ends.

  • The laser deals 2 kinds of damage, "Basic Damage" & "Custom Damage".

  • "Basic Damage" always deals 1 damage on anything, & this can hurt survivor teammates too, but the damage is not registered as a friendlyfire.

  • "Custom Damage" deals damage based on "Laser Pistol Damage". The damage of this one is registered to the shooter. Survivor teammates are immune to this damage.

  • As common infected are also weak to laser aside from burn & explosion damage, they will die instantly when hit by laser even if it only deals 1 damage (hardcoded by L4D2).

  • The laser can pierce through common infected. So, basically the laser shot is like a sniper bullet for pistol.

  • The laser can pierce through riot zombie's armor.

  • The laser can't pierce through objects/ special infected & tank, so the special infected or zombies behind the targeted special infected/ tank won't get hit by the laser.

  • As objects can take damage, this can also damage custom bosses/ enemies in custom campaigns.


Q: "What's with the explosion on the laser?"
A: "That's what it looks like when using 'Laser Extra Effect When Hit'. There are several effects to choose, & on the animated previews, I chose explosion effect."


& so Ellis is so happy that he gladly becomes heehaw cowboy with laser pistol. It's time to phew-phew the zombies with laser gun :D .


NOTES:
  • A possible secret feature: Not yet tested, but if you set the laser chance to 100 & then you use minigun while holding pistol, you'll have a laser minigun
1 Comments
Wero !!! 3 May @ 9:57am 
laser gun!