Comments

Commented 3 months ago2024-08-29 00:54:00 UTC in wiki page: Monsters Programming - Standard and Squad Monsters Comment #106343
if anyone wants to compare notes i got this npc working in game. you can reference things i did if anyone is stuck anywhere

link to solution:
https://twhl.info/thread/view/20840
Commented 3 months ago2024-08-28 09:12:28 UTC in wiki page: Tutorial: Coding NPCs in GoldSrc Comment #106340
since everyone has been having trouble with this and i needed to learn projectiles, i decided to work on fixing the bugs in this tutorial.
The integers that represent the animation events were not the same as what was written in the .qc for the melee attacks and reload so you had to change it to this
#define PDRONE_FIRE_SPIKE ( 1 )
#define PDRONE_MELEE_LEFT ( 2 )
#define PDRONE_MELEE_RIGHT ( 4 )
#define PDRONE_MELEE_BOTH ( 6 )
#define PDRONE_RELOAD ( 7 )
the return NULL under GetScheduleOfType was causing crashes so i changed it to:
return CBaseMonster::GetScheduleOfType(Type);
i had to make a custom checkAmmo function and override checkRangeAttack1 and explicitly call them in getSchedule.

and thats about it. heres a video preview of the changes i made and the showcasing it working. I will share the gitHub Code below so you can reference it.
PROJECTILE NPC
GITHUB FILES:
https://github.com/TylerMaster/ICE1/blob/BRANDON_SMITH_Ex1/wip_monster.cpp
https://github.com/TylerMaster/ICE1/blob/BRANDON_SMITH_Ex1/wip_monster.h