Left 4 Dead 2

Left 4 Dead 2

Turret System [Prefab]
44 条留言
华裔小A 2 月 21 日 下午 9:41 
It would be nice if a turret that can automate the original M2/M134 could be developed.
Fares 2023 年 7 月 16 日 上午 8:50 
as you know friendly turret fire still can damage survivors and incapacitate them.

easy solution: ( no scripting needed ):

1 open the turret instance with hammer editor
2 edit the "point_hurt" properties, set the Radius to 1
and the Damage to 1. (that way the point_hurt will do no damage)
3 create a "trigger_hurt" and parent it to the point_hurt.
4 filter your trigger_hurt with "filter_activator_team"
and that's it
Rectus  [作者] 2023 年 5 月 17 日 上午 8:01 
Somewhere inside the TrackTarget() function inside the checks for a valid target I guess. It's been years though, so can't remember how everything is set up. You would probably have to keep track of whether the sound is playing though, so it doesn't keep restarting.
Fares 2023 年 5 月 17 日 上午 7:48 
@Rectus i want the turret to play a sound when it move while tracking players, can you tell me where i can put the line "EmitSoundOn("Forklift.Move", self);"
Rectus  [作者] 2022 年 1 月 17 日 上午 12:44 
Nope. This is just a prefab to make new mods with. Someone would have to make a mod that does that.
Male18 2022 年 1 月 16 日 下午 9:23 
Any way to spawn this in campaign with admin system?
Rectus  [作者] 2021 年 7 月 27 日 上午 11:55 
Sorry, I'm not planning on updating it. You would have to do any work yourself.
Fares 2021 年 7 月 27 日 上午 11:25 
i hope you will got time to update this Turret System and remove friendly fire, right now when i add it on my custom map it always incapacitate the survivals
Rectus  [作者] 2021 年 7 月 27 日 上午 11:17 
Good point, it should be possible to use the same way as in there.
Fares 2021 年 7 月 27 日 上午 11:13 
didn't you make the Homemade Sentry Turret https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1742953520
damage only zombies, so isn't possible to make this one damage only zombies too?
Rectus  [作者] 2021 年 5 月 18 日 上午 1:06 
I don't have any on hand unfortuately.
Đinh Hương 2021 年 5 月 18 日 上午 12:59 
may i ask for example? because im amateur
Rectus  [作者] 2021 年 5 月 18 日 上午 12:27 
You would have to modify the FireWeapon() functions to check for team before doing damage.
Đinh Hương 2021 年 5 月 17 日 下午 11:52 
Anyway to remove friendly fire of Turret? Survivors can take damage from turret if stay near infected...
-VFSL-svsx 2019 年 3 月 24 日 上午 8:14 
god jez plz!!!
what a fucking amazing add-on!!!!!!
Can we make this turret can be carring and deploy on campain map?
maybe useing custom weapon base...?
Jackie Chan 2019 年 3 月 22 日 上午 11:17 
This Could Renovate the Workshop of L4D2. I Really think this deserves More Apreciation. But I would Actually Want this to Become Better. Btw this is nice
Vitamin 2018 年 1 月 10 日 上午 9:21 
it is very unfortunate that they (Valve) abandoned VScripts API, because this made replacement SourceMod, but very little capabilities
Rectus  [作者] 2018 年 1 月 10 日 上午 9:17 
BotQuery only lets you disable bots from meleeing props. It's used for the landmines in Holdout.
Vitamin 2018 年 1 月 10 日 上午 9:00 
Oh shit, only Garrys Mod provided this density functions ) What about BotQuery ? He is called when Survivor AI punch prop_physic !?
Rectus  [作者] 2018 年 1 月 10 日 上午 6:54 
Unfortunately there isn't that much you can do with the AI. CommandABot() is the only AI related function exposed in the VScript API, and it's use is very limited. There is no real way of controlling the bot systems or accessing the nav mesh. CommandABot() lets you command the bots to move somewhere or attack something, but they're really stupid while doing so, and ignore everything around them.
Vitamin 2018 年 1 月 10 日 上午 6:12 
Brilliant, thank you. But i see how you proffesional used VScripts for L4D2 and i have last question. It's possible (for example) disabled default AI for Survivors and write custom used only VScripts or enought (example Nav Mesh functions, etc). Because standalone AI - it's a pity ...
Rectus  [作者] 2018 年 1 月 10 日 上午 5:59 
Yeah, that would be possible with CommandABot(). This script should make common infected nearby attack the entity it's attached on. Although if you put it on the turret, you would need to modify the function to be called from the turret Think function instead of using AddThinkToEnt.
https://gist.github.com/Rectus/8d7604f350c824e45ec5ce378ed09264
Vitamin 2018 年 1 月 10 日 上午 5:22 
This possible say infected AI attack turrets (may be need used info_goal_infected or CommandABot). Please example :steamhappy:
Romaki 2016 年 5 月 20 日 下午 3:26 
AWESOME
Rectus  [作者] 2016 年 4 月 8 日 上午 2:35 
I think there are turret mods for sourcemod available, so check on alliedmodders. My turret system wouldn't work well as a server mod, since it doesn't work with the stock models so all players would need to download the turret models.
THE-LAST-SAINT 2016 年 4 月 8 日 上午 2:02 
i think most who read this can't mod at all like me so where can we find a turret that works
for local server that can be placed with a local server admin command!?
Rectus  [作者] 2016 年 4 月 8 日 上午 1:58 
Yes. There is an turret in the example map that can be turned on and off.
THE-LAST-SAINT 2016 年 4 月 8 日 上午 1:47 
so can you make a single minigun turret that works on it's own!?
one you can place and turn on/off ?
MackBananas 2015 年 12 月 20 日 上午 6:27 
spy sapping your sentries!:steamhappy:
Ace73 2015 年 9 月 13 日 上午 10:52 
Well this was an unexpected bit of awesome. And it's as easy as placing them as instances? Sign me up, I love sentries!
Rectus  [作者] 2015 年 9 月 7 日 下午 11:46 
Read the guide below.
lowskill 2015 年 9 月 7 日 下午 8:06 
Como se usa :(
Rectus  [作者] 2015 年 9 月 7 日 上午 5:39 
Rectus  [作者] 2015 年 9 月 7 日 上午 12:15 
The concept is pretty similar, but instead of Sourcemod, this is based on VScripts that can be attached to entities to make them behave like an autonomous turret.

Instead of directly installing it on a server, this can be added to custom maps, mutations or other script based mods by mod authors, and the scripts can be modified to suit their needs.

I'll probably write a guide instead of a video. Adding them in maps should be very easy though, just unpack the contents of the vpk, place a func_instance in the map and select the instance vmf for the turret you need.
Rectus  [作者] 2015 年 9 月 3 日 下午 2:07 
What exactly are you trying to do?
CygnusX1 2015 年 9 月 3 日 下午 2:01 
you should make a video on how to do it
CygnusX1 2015 年 9 月 3 日 下午 1:59 
did not work
Rectus  [作者] 2015 年 9 月 3 日 下午 1:39 
Use a func_instance to spawn it in a custom map, or see the Entity Placement Tool above for spawning it for a mutation.
CygnusX1 2015 年 9 月 3 日 下午 1:32 
yes i want to spawn it
Jules 2015 年 9 月 2 日 下午 6:13 
congrats
Qwazzy 2015 年 9 月 2 日 下午 3:14 
Pretty awesome idea. I might make use of this in a map I've been working on lately. Thanks for sharing.
Rectus  [作者] 2015 年 9 月 2 日 上午 8:28 
Do you want to spawn it in your map, or mutation?
CygnusX1 2015 年 9 月 2 日 上午 8:22 
how do you spawn it????
PeopleLikeStuff 2015 年 9 月 1 日 下午 2:43 
Cool prefab, dude.