• Laser STOOL 2.0
    455 replies, posted
  • Avatar of MadJawa
  • 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. [u][b]The new features:[/b][/u] [list] [*]Lasers can now be reflected by mirrors (Laser Reflector in the Entities tab) [*]You can now choose if the laser will push the props [*]New wire inputs (On/Off, Length, Width, Damage) [*]Sounds when turning the laser on/off and when killing something [*]Compatible with Stargate shields [*]Duplicator support [*]a few things I forgot [/list] [u][b]Special thanks to:[/b][/u] - 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 :P Of course, you don't need Wire or Stargate mod. If you set Damage to 0, the laser will not hurt anything. [u][b]Download:[/b][/u] [b]SVN :[/b] [url]https://svn.madjawa.net/lua/LaserSTOOL/[/url] [url=http://www.garrysmod.org/downloads/?a=view&id=122317][img]http://www.garrysmod.org/img/?t=dll&id=122317[/img][/url] [u][b]Known bugs:[/b][/u] [list] [*]If Keep Corpses is checked, NPCs won't dissolve correctly [b]FIXED[/b] [*]Heavy props are pushed toward the laser [b]FIXED[/b] [*]No free edicts (?) [*]Spawing a laser on a dead NPC gives a Lua error [b]FIXED[/b] [*]Active weapon sometimes disappears [b]FIXED[/b] (I hope) [*]Repeating sound when hitting a Strider buster [b]FIXED[/b] [*]Wired inputs not getting saved [b]FIXED[/b] [*]Props randomly appears to be infront of the beam [b]FIXED[/b] [*]Weird shadows randomly appearing [b]temp FIXED[/b] [*]Laser beam starts inside the emitter and not in front of it [/list] [u][b]To do:[/b][/u] [list] [*]Be able to make the laser ignore some props [b]ADDED[/b] [*]New effects (Scripted Effects) [/list] If you find another bug, I'll try to fix it as soon as possible.
  • Avatar of Urablahblah
  • Awesome! Is there a way to make it take power if LS is enabled? That would make it more compatible with SB. Still... AWESOME!
  • Avatar of CNiall
  • 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.
  • [QUOTE=CNiall]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.[/QUOTE] Also LS2 compatibility for people that don't like LS3.
  • Avatar of BlackWind
  • 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?
  • Avatar of Nev
  • 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. :D [B]Edit:[/B] 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.
  • Avatar of zzzzac1
  • 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.
  • Avatar of Zaitzev
  • I've been hoping for some update on the laser, and here it is! Awesome! You're a Lua King for sure! :D
  • Avatar of terrorclaw
  • 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..?
  • Avatar of MadJawa
  • [QUOTE=terrorclaw]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..?[/QUOTE] 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.
  • Avatar of Kogitsune
  • I was talking with Arkantos about the exact thing madjawa just said :). Pretty cool update there, madjawa. Nice job.
  • Avatar of Arkantos
  • Awesome tool. Found a little bug with pushing props. Instead of them flying away, it would slowly pull them towards the laser emitter.
  • Avatar of MadJawa
  • [QUOTE=Arkantos]Found a little bug with pushing props. Instead of them flying away, it would slowly pull them towards the laser emitter.[/QUOTE] I thought I fixed this :uhoh: Were you using mirrors? And what prop was it if you remember? I can't reproduce this bug. [QUOTE=Nevec]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.[/QUOTE] Now I know why I didn't see this bug : I mostly tested in multiplayer, and when I tested in single player, "keep corpses" was disabled. So until you check "Keep corpses", it works well. I'm trying to fix that but I can't find how to get the NPC ragdoll entity from the NPC entity..
  • Avatar of Kogitsune
  • [QUOTE=madjawa]I thought I fixed this :uhoh: Were you using mirrors? And what prop was it if you remember? I can't reproduce this bug [/QUOTE] He was using mirrors, but it was in between the laser and the first mirror. The prop was a green couch from HL2, not sure if tested any others.
  • Avatar of nebe123
  • [QUOTE=Kogitsune]It's a SENT in the download.[/QUOTE] thank you [b]Edit:[/b] [QUOTE=Nevec]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. :D [B]Edit:[/B] 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.[/QUOTE] download the derstebment mod the corpses blow up
  • Avatar of MadJawa
  • [QUOTE=Kogitsune]He was using mirrors, but it was in between the laser and the first mirror. The prop was a green couch from HL2, not sure if tested any others.[/QUOTE] Ok, there was no enough force to push the prop or something, it works better when scaling the force according to the prop's weight (I also use ApplyForceOffset instead of ApplyForceCenter now). Thanks :D I think I will upload the updated version when I get the NPCs ragdoll bug fixed.
  • Avatar of Nev
  • [QUOTE=madjawa]Now I know why I didn't see this bug : I mostly tested in multiplayer, and when I tested in single player, "keep corpses" was disabled. So until you check "Keep corpses", it works well. I'm trying to fix that but I can't find how to get the NPC ragdoll entity from the NPC entity..[/QUOTE] I'm up very early so don't yell if I say anything stupid. When you kill an NPC you can undo its corpe. So either the NPC entity turns into that ragdoll or the sandbox gamemode somehow fiddles with it. So try removing the NPC instead of finding its ragdoll entity, or look at the sandbox NPC spawn/kill part which adds the undo. [B]Edit:[/B] Also for applying force, apply it to the limb of the ragdoll it hits. That would make it more realistic.