Garry's Mod

Garry's Mod

NPC Fire SMG Grenade
21 条留言
BranShinoobi 6 月 6 日 上午 1:49 
I wish NPCs can also fire Pulse-Rifle AR2 Energy Ball
♩ṳṧт Պ✺ℵ!кᾰ 6 月 5 日 上午 3:53 
感谢作者:steamthumbsup:
XDforeth  [作者] 6 月 5 日 上午 2:08 
@♩ṳṧт Պ✺ℵ!кᾰ
我更新了一下代码结构,方便你自己改。

1、找到名为AllowedWeapons的表,这里面是该mod允许生效的武器。它长这样:
local AllowedWeapons = {
["weapon_smg1"] = true
}

2、比如你想加一个武器,它的类名(不是武器名)是weapon_ar2,那就将其添加到AllowedWeapons表里面去。也就是改成下面这样:
local AllowedWeapons = {
["weapon_smg1"] = true,
["weapon_ar2"] = true
}
注意逗号之类的别写掉了,你可以参考前面的代码中的那个AllowedNPCs表是怎么写的。
♩ṳṧт Պ✺ℵ!кᾰ 6 月 4 日 下午 11:28 
如果我想要给多个不同的武器添加npc发射榴弹功能,是不是只要在lua里面的smg1这个武器后面加上逗号再加上其他武器就可以了
XDforeth  [作者] 5 月 18 日 下午 8:14 
@IM HIM

After reading the lua code of that combine AI mod, I'm sure it has a different way to shoot SMG grenades, compared with my mod.
They are actually doing the same thing as you can see, but they will not really interfere in each other.
IM HIM 5 月 18 日 下午 12:46 
@Overwatch i believe it doesnt work with that ai mod because it already has it built in
Overwatch 1 月 1 日 上午 7:21 
SMG grenades does not work when there is combine AI mod. Do you have a chance to fix this?

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2807525115&searchtext=combine+ai
brandonewing25 2024 年 11 月 23 日 下午 8:14 
thx
XDforeth  [作者] 2024 年 11 月 23 日 下午 6:53 
@brandonewing25
I will do that if I have time
brandonewing25 2024 年 11 月 23 日 上午 9:37 
can you add a toggle for rebels to shoot smg grenades
so we can have combine or rebels shooting or both can shoot smg grenades
plz and thx
Gordon, GORDAN! 2024 年 10 月 18 日 下午 9:38 
I wonder if you could make an enhancer for NPCs that makes them fire at the true rate of fire of the MP7 when they use it rather than a noticeably slower firerate they normally use?
Trustworthy Around Explosives 2024 年 8 月 11 日 上午 11:31 
I always wondered why the combine never fired the SMG grenades, because the HECU did in the first game.
noobmaster68 2024 年 7 月 30 日 上午 3:19 
so cool man i'm going to give it a :steamthumbsup:
恋综男主 2024 年 7 月 22 日 下午 5:30 
对轰:)
Sa-Daniels 2024 年 6 月 7 日 下午 9:38 
对轰(
Stand_Up 2024 年 6 月 6 日 下午 8:23 
can you add a animation that npc play before shooting the smg grenade ?
derpblue 2024 年 6 月 5 日 上午 5:50 
When I use custom HL2 Grenade and this together, The custom HL2 Grenade override the setting in the option tab (Basically you can't see NPC's SMG Grenade setting anymore)
Cheesey 2024 年 6 月 4 日 下午 9:10 
Yeah, im pretty sure zbase uses different weapon, although they look much alike. The ar2 is a good example, the muzzleflash of the zbase if different from the default ar2. Thus, Zbase does NOT use default weapons. Unless they somehow do use the default smg1.
XDforeth  [作者] 2024 年 6 月 4 日 下午 8:39 
To correct what I said:
this addon will not work if the class of weapon that NPCs hold is not "weapon_smg1".
So something like SMG model replacement won't have any impact.
XDforeth  [作者] 2024 年 6 月 4 日 下午 7:21 
@Jack Morpeth

Check out his weapon and ensure that it is HL2 SMG. This addon will not work if there is any kind of replacement on HL2 SMG when NPCs hold it.
Oh, but you can edit this addon to make it work on any weapon.
Demonized Jack Lawrence Morpeth 2024 年 6 月 4 日 下午 2:04 
we got a bug then HL 2 Combine from Zbase fires his SMG Grenade?