• Why does weapon_alyxgun not exist in Garry's Mod?
    27 replies, posted
I don't see it. Is there some brutal past history that I'm not aware of? Does life end if I attempt to "create unknown entity type weapon_alyxgun"? What does Garry have against this weapon? :smith:
Download it from garrysmod.org Not that hard to figure out.
It is existent, I believe, but only npcs can have this item. But yet, I think i'm wrong
[QUOTE=ROFLBURGER;27110133]It is existent, I believe, but only npcs can have this item. But yet, I think i'm wrong[/QUOTE] Nope. The entity [B]does not exist[/B] in GMod. Even the HL2 maps in which the Alyx entity should have the Alyxgun produces the error.
And that's what the OP is asking. Why is it not in the game?
Sooo...the gun is ether not pre-installed with garrys-mod, HL2 doesn't have a view model for the player, or the name of the gun is something else....
[QUOTE=Jarrod;27148100]Sooo...the gun is ether not pre-installed with garrys-mod, HL2 doesn't have a view model for the player, or the name of the gun is something else....[/QUOTE] HL2 has no viewmodel but still it does exist as NPC Only wep
[QUOTE=NitronikALT;27148655]HL2 has no viewmodel but still it does exist as NPC Only wep[/QUOTE] No, no, no. weapon_alyxgun [B]exists in HL2 and its episodes[/B]. Therefore, when creating GMod, Garry himself intentionally removed the extant entity from the game's code. Knowing that this would cause errors with HL2 maps (Well, one error...) , why did he go along and do this?
This is... interesting.
[QUOTE=Blargh123;27149357]No, no, no. weapon_alyxgun [B]exists in HL2 and its episodes[/B]. Therefore, when creating GMod, Garry himself intentionally removed the extant entity from the game's code. Knowing that this would cause errors with HL2 maps (Well, one error...) , why did he go along and do this?[/QUOTE] [b] sir, it's the same thing i have said. And there is no VIEW model in half life 2. [/b] Maybe you misunderstood the npc weapon part. Well, i wasn't referring in any way to gmod.
try this command in console, although because there is no view model, you wont be able to see when you hold it: give weapon_alyxgun
[QUOTE=cartmin45;27153479]try this command in console, although because there is no view model, you wont be able to see when you hold it: give weapon_alyxgun[/QUOTE] Yes, I'm creating the entity. No, it's not appearing because, as I have said, it doesn't exist. What I want to know is, why? Why bother removing an entity and thus making Alyx all but useless when playing on HL2 maps?
just make a spawnlist for the gun and you're good to go...
[QUOTE=djgodary;27168575]just make a spawnlist for the gun and you're good to go...[/QUOTE] I guess you guys can't read. [b] even tought the weapon exists in HL2 as an NPC Only weapon, in Gmod it was completely removed[/b]
Gmod 1-9 had the Alyxgun. It was voluntarily removed in version 10, for what reason I do not know.
I suppose much use wasn't seen in it causing it to be removed.
But that makes no sense, it's one gun, people don't use a lot of props but every one of them is still in the game.
[url]http://www.garrysmod.org/downloads/?a=view&id=77013[/url]
[QUOTE=CombineGuru;27178879][url]http://www.garrysmod.org/downloads/?a=view&id=77013[/url][/QUOTE] Thanks, but I wanted the actual Alyx Gun that could be used by NPCs. (Props to you for the effort, I appreciate it.) Ah, heck, seeing as the class doesn't exist, I guess I'll have to make it myself. :v:
I'm pretty sure you can copy that part from the .fng from Hl2, then copy it to GMod. Not tested, but it should work.
I've seen custom models of the alyx gun in toyboy (I think) look for one there :o
[lua] if SERVER then AddCSLuaFile("shared.lua") SWEP.Weight = 5 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false end if CLIENT then SWEP.DrawAmmo = true SWEP.DrawCrosshair = true SWEP.PrintName = "Alyx's Gun" end list.GetForEdit("NPCWeapons").weapon_alyxgun = "Alyx's Gun" SWEP.Spawnable = false SWEP.AdminSpawnable = false SWEP.Primary.ClipSize = 30 SWEP.Primary.DefaultClip = 30 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "AlyxGun" SWEP.Primary.Delay = 0.1 SWEP.Primary.Damage = 10 SWEP.Primary.Spread = 0 SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" SWEP.HoldType = "pistol" SWEP.ViewModel = "models/weapons/v_357.mdl" SWEP.WorldModel = "models/weapons/W_Alyx_Gun.mdl" function SWEP:Initialize() if SERVER then self:SetNPCMinBurst(1) self:SetNPCMaxBurst(6) self:SetNPCFireRate(self.Primary.Delay) end self:SetWeaponHoldType(self.HoldType) if file.Exists("../sound/weapons/alyx_gun/alyx_gun_fire3.wav") then self.ShootSound = Sound("Weapon_Alyx_Gun.NPC_Single") else self.ShootSound = Sound("Weapon_Pistol.NPC_Single") end end function SWEP:Deploy() if SERVER and self.Owner:IsNPC() then self.Owner:SetCurrentWeaponProficiency(4) end return true end function SWEP:Reload() self:DefaultReload(ACT_VM_RELOAD) end function SWEP:Think() end function SWEP:PrimaryAttack() self:SetNextSecondaryFire(CurTime() + self.Primary.Delay ) self:SetNextPrimaryFire(CurTime() + self.Primary.Delay ) if not self:CanPrimaryAttack() then return end self:EmitSound(self.ShootSound) self:ShootBullet() self:TakePrimaryAmmo(1) end function SWEP:ShootBullet() self.Owner:FireBullets{ Num = 1, Src = self.Owner:GetShootPos(), Dir = self.Owner:GetAimVector(), Spread = Vector(self.Primary.Spread, self.Primary.Spread, 0), Tracer = 4, Force = 5, Damage = self.Primary.Damage } self:SendWeaponAnim(ACT_VM_PRIMARYATTACK) self.Owner:MuzzleFlash() self.Owner:SetAnimation(PLAYER_ATTACK1) end function SWEP:SecondaryAttack() return end [/lua] 5-minute SWEP. :v: Probably needs some tweaks, I don't remember how much damage the real Alyx Gun does. [url=http://uppix.net/4/9/f/b519b5ebcb72f8df725d2e6d07bcf.html][img]http://uppix.net/4/9/f/b519b5ebcb72f8df725d2e6d07bcftt.jpg[/img][/url]
[QUOTE=_Kilburn;27192523][lua] if SERVER then AddCSLuaFile("shared.lua") SWEP.Weight = 5 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false end if CLIENT then SWEP.DrawAmmo = true SWEP.DrawCrosshair = true SWEP.PrintName = "Alyx's Gun" end list.GetForEdit("NPCWeapons").weapon_alyxgun = "Alyx's Gun" SWEP.Spawnable = false SWEP.AdminSpawnable = false SWEP.Primary.ClipSize = 30 SWEP.Primary.DefaultClip = 30 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "AlyxGun" SWEP.Primary.Delay = 0.1 SWEP.Primary.Damage = 10 SWEP.Primary.Spread = 0 SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" SWEP.HoldType = "pistol" SWEP.ViewModel = "models/weapons/v_357.mdl" SWEP.WorldModel = "models/weapons/W_Alyx_Gun.mdl" function SWEP:Initialize() if SERVER then self:SetNPCMinBurst(1) self:SetNPCMaxBurst(6) self:SetNPCFireRate(self.Primary.Delay) end self:SetWeaponHoldType(self.HoldType) if file.Exists("../sound/weapons/alyx_gun/alyx_gun_fire3.wav") then self.ShootSound = Sound("Weapon_Alyx_Gun.NPC_Single") else self.ShootSound = Sound("Weapon_Pistol.NPC_Single") end end function SWEP:Deploy() if SERVER and self.Owner:IsNPC() then self.Owner:SetCurrentWeaponProficiency(4) end return true end function SWEP:Reload() self:DefaultReload(ACT_VM_RELOAD) end function SWEP:Think() end function SWEP:PrimaryAttack() self:SetNextSecondaryFire(CurTime() + self.Primary.Delay ) self:SetNextPrimaryFire(CurTime() + self.Primary.Delay ) if not self:CanPrimaryAttack() then return end self:EmitSound(self.ShootSound) self:ShootBullet() self:TakePrimaryAmmo(1) end function SWEP:ShootBullet() self.Owner:FireBullets{ Num = 1, Src = self.Owner:GetShootPos(), Dir = self.Owner:GetAimVector(), Spread = Vector(self.Primary.Spread, self.Primary.Spread, 0), Tracer = 4, Force = 5, Damage = self.Primary.Damage } self:SendWeaponAnim(ACT_VM_PRIMARYATTACK) self.Owner:MuzzleFlash() self.Owner:SetAnimation(PLAYER_ATTACK1) end function SWEP:SecondaryAttack() return end [/lua] 5-minute SWEP. :v: Probably needs some tweaks, I don't remember how much damage the real Alyx Gun does. [url=http://uppix.net/4/9/f/b519b5ebcb72f8df725d2e6d07bcf.html][img_thumb]http://uppix.net/4/9/f/b519b5ebcb72f8df725d2e6d07bcftt.jpg[/img_thumb][/url][/QUOTE] :ninja: Thanks, I didn't even know that Entity.MuzzleFlash existed. :v: Cheers. Wait, is Entity.SetAnimation there because NPCs aren't affected by Weapon.SendWeaponAnim? I wouldn't know either way, but eh. Oh right, nice work. :v:
Nice quickie, but the real question is: Why was it not included in the current version of Gmod?
[QUOTE=Steven :D;27201025]Nice quickie, but the real question is: Why was it not included in the current version of Gmod?[/QUOTE] At this point, I doubt that we're ever going to get a straight answer to this question, Garry's probably the only one who knows. I guess we should just be glad that we can still use the class name? Thanks again to _Kilburn for the script, saves everyone some time and trouble.
[QUOTE=Blargh123;27200912]:ninja: Thanks, I didn't even know that Entity.MuzzleFlash existed. :v: Cheers. Wait, is Entity.SetAnimation there because NPCs aren't affected by Weapon.SendWeaponAnim? I wouldn't know either way, but eh. Oh right, nice work. :v:[/QUOTE] SendWeaponAnim sends viewmodel animations. Obviously not needed at all, but I just did some quick copy pasta and didn't bother removing it. SetAnimation makes the owner play the firing animation, although I'm not sure it's needed for NPCs.
[QUOTE=Blargh123;27203788]At this point, I doubt that we're ever going to get a straight answer to this question, Garry's probably the only one who knows. I guess we should just be glad that we can still use the class name? Thanks again to _Kilburn for the script, saves everyone some time and trouble.[/QUOTE] Maybe it was removed as part of the TF2 update? *shrugs*
[QUOTE=Cloudhunter;27214022]Maybe it was removed as part of the TF2 update? *shrugs*[/QUOTE] Why aren't all the HL2 weapons gone then
Sorry, you need to Log In to post a reply to this thread.