Garry's Mod

Garry's Mod

NPC Spawn Platforms v3
 此主題已被置頂,因此它可能很重要
brentonimo 2019 年 7 月 16 日 上午 9:20
How to change the NPC_Classname to a Custom NPC
I'm hoping you can help me with this, I've added the FGD to Hammer, specifically garrysmod.fgd.

The entity arrives perfectly inside of Hammer, I'm unaware however as to how to change the NPC Class within Hammer to something like, let's say, ODSTs with ARs.

Hopefully you can educate me,

Keep up the tremendous work.
< >
目前顯示第 1-4 則留言,共 4
brentonimo 2019 年 7 月 16 日 上午 9:21 
PS: Your cursed
https://imgur.com/YOXYAo4
brentonimo 2019 年 7 月 17 日 下午 12:58 
For anyone interested, I have figured out how to include Workshop NPCs and how to signal to Hammer on how to pull reference them.

You'll want to unpack your NPC addon of choice with gmad.exe found in the Garrysmod Bin Folder.

When the respective addon's folder is generated in your garrysmod/addons folder, open the lua folder and find the script for your NPC of choice.

In there you'll be looking for a class name similar to the Default NPC classes seen in Hammer such as "npc_soldiercombines" or "npc_citizen".

In my case, it was "npc_alfie_odst_friendly".

Copy that classname and paste in the NPC Classname section of your NPC Spawnplatform properties.

Save and Compile your map and load in Garry's Mod and VOILA!

Hope this helps anyone who wants to build these into their map and not be limited to HL2 NPCs.

I'll post more as more becomes revealed through trial and error, such as a custom weapon class and some ability to modify bodygroups.

Stay posted.
brentonimo 2019 年 7 月 17 日 下午 1:05 
Ok same deal with weapons guys and gals:

Unpack the NPC Swep addon of your choice and head to the lua for the weapon classes.

There you'll find a list of all the various weapons that addon references and, same drill, copy and paste into the Weapon Class section of your Spawn Platform properties menu within Hammer.

Save, Compile and Load the map and once again, works like a charm.

In case it isn't already clear, make sure to actually have the addon installed in your addons folder and make sure your referencing NPC SWEPS not player weapons or props!

Good luck!

If I can come up with a work around for Bodygroups you'll find it below in time.
Lexi  [開發人員] 2019 年 7 月 18 日 上午 8:40 
I'm glad this is working for you, this feature has always been somewhat experimental. I don't currently have any way to set body groups (or spawn flags). Happy to help with other problems
< >
目前顯示第 1-4 則留言,共 4
每頁顯示: 1530 50