Garry's Mod

Garry's Mod

129 ratings
Scrap Turret
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: NPC
Addon Tags: Fun
File Size
Posted
Updated
1.714 MB
3 Mar, 2019 @ 4:29pm
25 Jul, 2019 @ 9:25am
13 Change Notes ( view )

Subscribe to download
Scrap Turret

Description
A simple turret made from scraps that shoots at bad guys.


Disclaimers ────────────────────────────────────

This addon requires Counter-Strike: Source, Half-Life 2 and Half-Life 2: Episode Two game contents.

This addon is currently incompatible with saves.

This addon is still unfinished and hasn't been thoroughly tested. If you find a bug, please write it in the comments with the steps to reproduce said bug, thank you.


Questions ─────────────────────────────────────

Q: How do I spawn a turret?
A: Q Menu 🡒 Entities 🡒 Scrap Turret

Q: How do I replenish a turret's ammo / health?
A: Spawn an "Ammo Box" / "Repair Kit" and touch the turret with it.

Q: How does the turret decide if an entity is an enemy?
A: It looks at the relationship of said entity with the owner of the turret (which currently is whoever spawns it) and uses that to determine if the entity should be considered an enemy or not. Basically, if an entity wants to kill you, the turret will want to kill that entity.

Q: How does the turret index thing work?
A: Since there could be more than one turret spawned at the same time, the turret index allows you to specify to which turret the command should be sent to. Look at the back of a turret to see it's index.


Legend ───────────────────────────────────────




Console commands ───────────────────────────────

Ammo
  • scrap_turret_set_ammo turret_index integer_value
  • scrap_turret_set_ammo_max turret_index integer_value
Cheats
  • scrap_turret_set_ammo_infinite turret_index boolean_value
  • scrap_turret_set_god_mode turret_index boolean_value
Damage
  • scrap_turret_set_damage turret_index integer_value
Health
  • scrap_turret_set_health turret_index integer_value
  • scrap_turret_set_healtht_max turret_index integer_value
Magazine
  • scrap_turret_set_magazine turret_index integer_value
  • scrap_turret_set_magazine_max turret_index integer_value
  • scrap_turret_set_direct_feed turret_index boolean_value
Photo mode
  • scrap_turret_set_photo_mode turret_index integer_value
Shield
  • scrap_turret_set_shield turret_index integer_value
  • scrap_turret_set_shield_max turret_index integer_value


Known bugs ───────────────────────────────────

  • Shadows sometimes don't render properly
  • When attacked by manhacks or similar enemies, the whole turret rotates
  • The turret shoots intermittently at non-humanoid enemies
Popular Discussions View All (1)
0
19 Sep, 2021 @ 8:37am
not multiplayer compatible
the nano that does stuff
49 Comments
YEETER9000 12 Apr @ 8:11pm 
yeah... this thing is so broken it crashes my game, I don't even get to spawn it, I install the mod and load a map, and crash in the loading screen
P3 25 Jan, 2023 @ 1:48pm 
[Scrap Turret] Trying to remove server entity scrap_turret_head#182 on client!
1. Function - lua/entities/scrap_turret_base/shared.lua:30
2. v - lua/includes/extensions/entity.lua:146
3. unknown - lua/includes/modules/hook.lua:96

when undo
TheEnterprise 22 Nov, 2022 @ 10:14pm 
is this mod DEAD???
NextKuromeThe76Soldier 14 Mar, 2021 @ 6:52am 
the muzzleflash is a bit too large, and it makes error when undo

[ERROR] Trying to remove server entity scrap_turret_head#520 on client!
1. Function - lua/entities/scrap_turret_base/shared.lua:30
2. v - lua/includes/extensions/entity.lua:146
3. unknown - lua/includes/modules/hook.lua:84

also could you make it work with nextbots?
BloodWraith42 10 Jan, 2021 @ 11:58am 
the mod is great and for a while worked fine but suddenly the turrets muzzle flash is the is like 100 times bigger than it was before. making the muzzle flash bigger than the turret itself. while initially hilarious it has proved an annoying and persistent bug.
ShubDrub 26 Oct, 2020 @ 10:37am 
[Scrap Turret] Trying to remove server entity scrap_turret_head#211 on client!

1. Function - lua/entities/scrap_turret_base/shared.lua:30
2. v - lua/includes/extensions/entity.lua:134
3. unknown - lua/includes/modules/hook.lua:84
THE EMPEROR'S STRONGEST SOLDIER 10 Oct, 2020 @ 1:24pm 
Max the Murderer I circumvented it by using the gravity gun and tossing the ammo/repair at it
Awkor  [author] 3 Sep, 2019 @ 12:55am 
Unfortunately I was unable to reproduce the error on my machine, maybe it's a mod conflict? I don't really know why it wouldn't even show up the menu.
Awkor  [author] 2 Sep, 2019 @ 10:44am 
There's a list on the left when you select the "Entities" tab, on that list there should be an entry named "Scrap Turret" with all the entities of this addon.
rats 29 Aug, 2019 @ 4:37pm 
i cant find it in entities