Garry's Mod

Garry's Mod

gm_boreas
Smoothie 2022 年 10 月 25 日 上午 6:44
NPCs can't open bunker doors
For some reason, NPC's such as combine can't open the bunker doors (the white ones with windows and keypads). Is there a workaround?
< >
正在显示第 1 - 4 条,共 4 条留言
Blueberry_pie  [开发者] 2022 年 10 月 25 日 上午 10:50 
As far as I can tell, sliding doors in HL2/GMod can not be used by NPCs unless they are specifically scripted to do so. I did some quick experimenting but I don't think there's much I can do to solve this without introducing other issues.

However, if you're playing in singleplayer mode or if you're admin on a server, you can run some console commands to open all of these doors at once. To do so, open the console with Shift+Esc and enter the following two lines (enter them separately, because the command is too long otherwise):
ent_fire archiveDoor* open; ent_fire controlRoomDoor* open; ent_fire corridorDoor* open; ent_fire generatorsDoor* open; ent_fire greeneryDoor* open; ent_fire kitchenDoor* open; ent_fire livingQuartersDoor* open
ent_fire quarantineDoor* open; ent_fire recRoomDoor* open; ent_fire scienceLabDoor* open; ent_fire serversDoor* open; ent_fire sickBayDoor* open; ent_fire siloDoor* open; ent_fire storageDoor* open

This should have the same effect as if you'd opened each door of this type manually. Each door will remain open until you use its keypad again.

Alternatively, to remove these doors completely, enter these commands:
ent_fire archiveDoor* kill; ent_fire controlRoomDoor* kill; ent_fire corridorDoor* kill; ent_fire generatorsDoor* kill; ent_fire greeneryDoor* kill; ent_fire kitchenDoor* kill; ent_fire livingQuartersDoor* kill
ent_fire quarantineDoor* kill; ent_fire recRoomDoor* kill; ent_fire scienceLabDoor* kill; ent_fire serversDoor* kill; ent_fire sickBayDoor* kill; ent_fire siloDoor* kill; ent_fire storageDoor* kill

I should note that both workarounds will also affect a couple of non-sliding doors that happen to have a similar name, but that shouldn't cause any issues. I've only tested this briefly, though, so I can't make any guarantees.
最后由 Blueberry_pie 编辑于; 2022 年 10 月 25 日 上午 10:55
Smoothie 2022 年 10 月 25 日 下午 12:07 
That's been the solution so far, (ent_fire *door* open, interferes with other stuff but is fast), however I've noticed that nextbots tend to have no trouble with said doors (presumably due to a more up to date codebase), and as impossible as it sounds, do you think there is a way to implement interact nodes into the nodegraph to cause NPCS to trigger the keypads?
Blueberry_pie  [开发者] 2022 年 10 月 25 日 下午 1:11 
引用自 Red
do you think there is a way to implement interact nodes into the nodegraph to cause NPCS to trigger the keypads?
A nodegraph really only provides information on navigating the world, strategic opportunities and visual points of interest. The actual behaviour resulting from that information depends entirely on the NPC's programming.

It probably wouldn't be too hard to create custom NPCs or extend existing NPCs so that they interact with nearby buttons when they encounter a closed door, but something like that would be better off being its own addon (if it doesn't exist already). It's not something that I'm interested in building and maintaining.
Smoothie 2022 年 10 月 25 日 下午 2:20 
Was thinking hints, but idk if that would work anyway. Thanks for the help tho, this map is hella underrated and you should be proud of it
最后由 Smoothie 编辑于; 2022 年 10 月 25 日 下午 3:46
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50