Laser STOOL 2.0

This is the new version of my Laser STOOL. I recoded it from scratch, because the old version was using Source’s env_laser entity that limited the possibilities.

The new features:
[ul]
[li]Lasers can now be reflected by mirrors (Laser Reflector in the Entities tab)[/li][li]You can now choose if the laser will push the props[/li][li]New wire inputs (On/Off, Length, Width, Damage)[/li][li]Sounds when turning the laser on/off and when killing something[/li][li]Compatible with Stargate shields[/li][li]Duplicator support[/li][li]a few things I forgot[/li][/ul]

Special thanks to:

  • Nevec, for the idea of disintegrating the player’s ragdoll
  • Nevec and Kogitsune, for helping me to solve the NPC ragdoll bug in SP
  • AzuiSleet, for solving the “laser always drawing behind props” bug
  • People on the #luahelp IRC chan
  • Everyone on my server that “helped” in beta testing :stuck_out_tongue:

Of course, you don’t need Wire or Stargate mod.
If you set Damage to 0, the laser will not hurt anything.

Download:

SVN : https://svn.madjawa.net/lua/LaserSTOOL/

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

Known bugs:
[ul]
[li]If Keep Corpses is checked, NPCs won’t dissolve correctly FIXED[/li][li]Heavy props are pushed toward the laser FIXED[/li][li]No free edicts (?)[/li][li]Spawing a laser on a dead NPC gives a Lua error FIXED[/li][li]Active weapon sometimes disappears FIXED (I hope)[/li][li]Repeating sound when hitting a Strider buster FIXED[/li][li]Wired inputs not getting saved FIXED[/li][li]Props randomly appears to be infront of the beam FIXED[/li][li]Weird shadows randomly appearing temp FIXED[/li][li]Laser beam starts inside the emitter and not in front of it[/li][/ul]

To do:
[ul]
[li]Be able to make the laser ignore some props ADDED[/li][li]New effects (Scripted Effects)[/li][/ul]

If you find another bug, I’ll try to fix it as soon as possible.

Fucking AWESOME. Lua kinged and adding to my server

woah, good idea with mirrors :smiley:

Finally you released it! Great work!

Wow! This is great. I never thought you could do so much in lua!

Awesome!

Awesome! Is there a way to make it take power if LS is enabled? That would make it more compatible with SB. Still… AWESOME!

Given that LS3 is coming out fairly soon (note fairly) if I recall correctly, it may be better if madjawa leaves LS compatibility until the full release of LS3 if he (she?) decides to implement it.

Also LS2 compatibility for people that don’t like LS3.

I have not tested it yet, so i don’t know the full functions, but for the next update could you make it have the effect that you can choose whether it could kill you or not, pp buddys (prop protection), nobody (except npcs), i bit like Anti-noclip. (If you use Anti noclip)

EDIT:

And What do you mean, Mirrors? do you have to materialize the props?

works great, nice job on this madjawa :excited:

Awesomeness cannot describe this. :rolleye:

If you decide to make an LS dependant version then you should also add GCombat and/or CDS support. So that we can drill holes into ships. :smiley:

Edit:

Hm. It seems that I found a bug.

Whenever a laser kills an NPC it kinda creates two ragdolls, one is invisible and gets disintegrated but the other stays as it is.

I looked at your code and it may be because you aren’t removing the created ragdoll entity. When you fire the disintegrate entity it creates a separate model to be disintegrated, so you still have to remove the NPC ragdoll entity. It works fine for players, though.

holy carp

How does one rebuild the VGUI in the qmenu? Beacuse I can spawn the wiremod laser model fine, but in the VGUI it shows up as an error.

I’ve been hoping for some update on the laser, and here it is! Awesome! You’re a Lua King for sure! :smiley:

Bouncing lasers! :excited:

Well, I have a question, Why does it only bounce three or four times, and is there a way to change it so it can bounce more then that…?

I made that to avoid infinite bouncing with two parallel mirrors. And to avoid general lag too. You can change that in the file Laser STOOL 2/lua/entities/gmod_laser/shared.lua, change the variable “LASER_MAXBOUNCES” at line 19 (I plan to make a convar for this, and maybe increase the default value if it doesn’t lag too much)

Also thanks Nevec, I’m looking into this ragdoll bug.

I was talking with Arkantos about the exact thing madjawa just said :). Pretty cool update there, madjawa. Nice job.

Awesome tool.

Found a little bug with pushing props. Instead of them flying away, it would slowly pull them towards the laser emitter.