Left 4 Dead 2

Left 4 Dead 2

Homemade Sentry Turret
 此主题已被置顶,因此可能具有重要性
Rectus  [开发者] 2019 年 5 月 16 日 上午 10:25
FAQ & Troubleshooting
  • Does the Sentry Turret replace any weapon?
    No, it is a brand new weapon. It does however replace a few melee weapon spawns on each map.

  • Does the Sentry Turret work in single player?
    Yes

  • Does the Sentry Turret work in multiplayer?
    Yes, but every player and, if using one, the server, needs to have the add-on as sell as the Custom Weapon Base installed. If hosting a lobby Local Hosting needs to be selected.

  • Does the Sentry Turret work on custom campaigns?
    No, unless noted otherwise in the campaign. The Sentry Turret would have to be added to each individual campaign along with a control script in order to work.

  • Where can I find the weapon?
    Anywhere melee weapons normally spawn.

  • What mods are incompatible with this?
    Mods that alter gameplay by running VScripts are likely incompatible. That includes the Admin System and CS:S weapon unlockers. The Sentry Turret is compatible with other mods using the Custom Weapon Base. A special compatible CS:S weapon unlocker also exists.

  • How do I spawn the Sentry Turret from console?
    Use the command:
    give sentry


Troubleshooting guide
  • The Sentry Turret can not be placed.
    This is likely caused by incompatibility with other mods. Disable other addons, especially conflicting ones.

    To place the turret hold down the fire button until the turret outline appears, then move the outline to a valid surface and make sure it turns green before releasing the fire button.

  • The Sentry Turret does not spawn.
    Disable other addons featuring custom melee weapons or modes featuring mission file replacements. Make sure the Custom Weapon Base is installed. Make sure you are not playing on a custom campaign/map, and that you're hosting the game or playing on a server with the mod installed.

Known issues and Limitations
  • No bullet holes are left on surfaces and infected dismemberment does not work at range.
  • Does not work with custom campaigns unless the campaign is modified to include it.
  • Incompatible with other addons that globally execute scripts.
最后由 Rectus 编辑于; 2019 年 5 月 20 日 上午 12:59
< >
正在显示第 1 - 15 条,共 16 条留言
Morning 鰻魚精奶奶 2019 年 5 月 19 日 下午 8:55 
At first, thanks for the preview video. It made me have more questions:
  1. Is it possible to place a turret on a wall or ceiling in the future?
  2. Could players reload the turret with ammunition of shotguns, sniper rifles and grenade launchers?
  3. Would reloading the ammo of rifle get higher damage?
  4. Could players collect all ammunition from a turret with full ammo if we don't need it anymore? (The player must deploy it before scavenging its all ammo, of course)
最后由 Morning 鰻魚精奶奶 编辑于; 2019 年 5 月 20 日 上午 11:21
Rectus  [开发者] 2019 年 5 月 20 日 上午 1:05 
The turret is set up to accept ammo from everything except the M60 and grenade launcher.

Your ideas sound cool and possible to do, but I don't think they fit this particular turret that well. Collecting ammo from the turret would probably make it harder to use.
最后由 Rectus 编辑于; 2019 年 5 月 20 日 上午 1:05
Morning 鰻魚精奶奶 2019 年 5 月 20 日 下午 3:09 
How many bullets of turret can replenish per shell? I think both smg and rifle are 1:1 exchange but shells of shotgun might be unable to be the same exchange rate like them.

Would it stop the player reloading to full ammo if player doesn't possess enough ammunition? At least leaving 1/5 or 1/3 reserved ammo for primary guns. (smg: 650 ÷ 5 = 130 or rifle: 360 ÷ 3 = 120)
Rectus  [开发者] 2019 年 5 月 20 日 下午 11:41 
It's set to use a third of the players maximum ammo to fully replenish the turret, regardless of ammo type.
blackjacksike 2022 年 1 月 1 日 上午 6:12 
Hey Rectus, may I ask how did you program the preview? :sentry:
Rectus  [开发者] 2022 年 1 月 1 日 上午 7:14 
It is setup as a prop_dynamic with a transparent material. I spawn it when the player starts holding down the fire buttton, parent it to the players viewmodel to keep it moving smoothly with the view and only be visible to them. every tick I trace in the view direction, and then move the model down to the ground if it hits.

The code is available here if you want to use it:
https://github.com/Rectus/l4d2-vscripts/blob/master/custom_weapons/sentry_turret/custom_sentry.nut
BrounceLord 2023 年 6 月 11 日 下午 12:22 
how to make stop attract zombies and make it unbreakable
Rectus  [开发者] 2023 年 6 月 11 日 下午 1:58 
To stop it from attracting zombies, you would have to remoce the relevant code in the script. To make it unbreakable, you would have to recompile the turret base model.
Shoah Kahn 2024 年 3 月 14 日 下午 11:56 
For me, the turret place... The character leans down and looks like they are deploying it; only for the turret to disappear form the ground and back into their hands. I've tested this with all mods but the custom weapon base one, off, on both official and custom maps (the latter causing some other issues, like the map not loading).
Rectus  [开发者] 2024 年 3 月 15 日 上午 1:33 
Do you have any auto-reload or shove scripts that interrupt firing?
multo 2024 年 3 月 30 日 上午 6:18 
so i found out u cant deploy the sentry with the vscript lib for some reason
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2821408044
最后由 multo 编辑于; 2024 年 3 月 30 日 上午 6:18
Rectus  [开发者] 2024 年 3 月 30 日 上午 8:08 
Guessing one of the mods using that is preventing the turret scripts from running.
Magnus Caramelo 2024 年 5 月 13 日 上午 8:56 
Does this work on classic L4d2 and l4d1 survival maps?
Rectus  [开发者] 2024 年 5 月 13 日 上午 9:03 
Not sure if it works in survival by deafult. If I remember right, the way the weapons spawn in won't let it work. It should be possible to cheat and spawn it in from console though.
Sentient Cinder Block 2024 年 6 月 27 日 下午 6:32 
Hey Rectus

Usually when im using the turret mod it will fall over and just flip around and stuff, i tried uninstalling your other turret mod but that did not work, would you mind giving some insight into the problem?

Sincerely, Sentient Cinder Block
< >
正在显示第 1 - 15 条,共 16 条留言
每页显示数: 1530 50