View Single Post
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 12-20-2010 , 03:32   Re: [HOWTO] Make a NPC with extra features.
Reply With Quote #8

@Arkshine
Thanks for that! Didn't realize that function works with floats.
Do you mean I should not use RegisterHamFromEntity() at all or just once?
Something like this?
PHP Code:
public plugin_init()
{
    
register_plugin("NPC Plugin""1.0""Mazza");
    
register_clcmd("say /npc""clcmd_npc");
    
    
RegisterHam(Ham_TakeDamage"info_target""npc_TakeDamage");
    
RegisterHam(Ham_Killed"info_target""npc_Killed");
    
RegisterHam(Ham_Think"info_target""npc_Think");
    
RegisterHam(Ham_TraceAttack"info_target""npc_TraceAttack");

Would I still need to filter out the classname for each of them inside the forwards?

@bibu
I'm quite sure there is a tutorial on how the touch forward works. That's why I didn't really bother with it. If there is much requests for this feature, I'll write it up.
As you said, giving a NPC a weapon is already in the other tutorial so I found no need to simply just copy and paste it in here.

@meTaLiCroSS
Mmm... I had problems last night with those pev values... But fixed now.
Silly me! Was working on this quite late last night and wasn't thinking straight.
__________________
It's a mystery.
Mini_Midget is offline