Garry's Mod

Garry's Mod

gmDoom
NPC Hooks
I'm keen in getting gmDoom to work with a custom gamemode, but it's a little tricky to work with for a couple of primary reasons:

1. When you kill a monster, it's not technically dead and is considered a live entity. This means hooks like "OnNPCKilled" will not trigger, it also means there's a limit to how many NPCs you can have as it will count their corpse.

2. This is kind of related to point 1. I want to override what items they drop on death. Obviously I can't do that because of the OnNPCKilled problem, but they seem to ignore spawnflags, meaning they will always drop something, whether you tell them to or not.

Is there a way around these issues?

Other than that, this is a brilliant mod and works flawlessly. Thanks!
< >
Näytetään 1-3 / 3 kommentista
I have no idea how to resolve two, but... Got one you can write a script that checks for an entities dead sprite, and if true it removes the NPC. Have it on a like, ten min timer giving the player some time to prepare for the next wave with Doomseekers "PREPARE TO FIGHT" announcer.
Thanks for the reply. That may work, but I wanted that hook so I can have them drop custom items. Having the player wait around 10 minutes to see if it drops anything could be a little problematic xD
I found the bit of code that "kills" the entity, but oddly enough it looks like it's all client side, which sucks a bit.
I put kills in quotes because they're not actually dead. Their sprite just looks dead.
Poltergasm lähetti viestin:
-I found the bit of code that "kills" the entity, but oddly enough it looks like it's all client side, which sucks a bit.
I put kills in quotes because they're not actually dead. Their sprite just looks dead.

I bet its totally do-able to have them drop custom items, like small health pickups, but I guess you could just have them removed when they land on the dead sprite. Also the NPC has to stay alive inorder for the sprite to track to player, so Its a known issue.
< >
Näytetään 1-3 / 3 kommentista
Sivua kohden: 1530 50