NPC tutorials ?

I’m making an Kamikaze gamemode.
It already existed in GMod 12 people loved it so i’m renewing it for GMOD 13 but i have 1 big problem ,
How to make the kamikaze NPC ?

I looked for tutorials , Tried things myself but i have no success Do you guys know a tutorial or do you know how to make an NPC

I did post things on coderhire but nobody answers so Any Tutorials

Picture of that Kamikaze NPC

Thx in advance

***Edit : *** i Already have the NPC it can now explode and has a model but i need to add animations
And i decompiled the model

No tutorials.
Atleast none that I can think of.

The best way is just to download some NPC on workshop, decompile the file and learn off the code.

Search the forums on “NextBot”
someone made some spidermines from UT2004 and posted their code, I don’t have it readily available but I thought it was most useful as an example.

They track players and explode already, so it should be very similar to what you are wanting to do.

Oh i see THx

Bump i already have my NPC but it won’t move

Go to gm_construct, and put “nav_generate” in console

Can i do it on every map ?

Yeah you should be able to and I said gm_construct because it shouldn’t take long to generate the file

wait so my npc should be able to move then

If i want to make my NPC move what do i have to do i used an TF model i made 3 scripts ( init / cl_init / shared ) In the init i made this


[LUA]ENT.Model = “models/bots/demo/bot_sentry_buster.mdl” = 10
ENT.Damage = 50
ENT.hurt1 = “sound/kamikaze/kamikazed/HurtMinor02.wav”
ENT.hurt2 = “sound/kamikaze/kamikazed/HurtMinor04.wav”
ENT.hurt3 = “sound/kamikaze/kamikazed/HurtMinor06.wav”
ENT.idle1 = “mcsnpchostile/creeper/idle1.wav”
ENT.idle2 = “”
ENT.idle3 = “”
ENT.idle4 = “”
ENT.attack1 = “sound/kamikaze/attack/kami_1.wav”
ENT.attack2 = “sound/kamikaze/attack/kami_4.wav”
ENT.attack3 = “sound/kamikaze/attack/kami_2.wav”
ENT.attackmiss1 = “”
ENT.attackmiss2 = “”
ENT.attackmiss3 = “”
ENT.die1 = “sound/kamikaze/die/die1.wav”
ENT.die2 = “sound/kamikaze/die/die1.wav”
ENT.die3 = “sound/kamikaze/die/die1.wav”
ENT.bCrackSound = true
ENT.dSkin = 1
ENT.dFireSkin = 1
ENT.dBodyGroup0 = 1
ENT.dBodyGroup1 = 1
ENT.dBodyGroup2 = 1
ENT.dFireBgroup = false
ENT.dHaveBodyGroups = true
ENT.bBGroup1 = true
ENT.bBGroup2 = true
ENT.bBGroup3 = true[/LUA]

–Explosion Function + The OnTakeDamage function

But where do i need to add the animations like :

$includemodel "humans/bot_demo.mdl"
$includemodel "humans/bot_demo_animations.mdl"
$includemodel "humans/bot_sentry_buster.mdl"

? Thx in advance