Talk:AI Programming Overview

From Valve Developer Community
Revision as of 18:49, 4 August 2005 by N-neko (talk | contribs) (Hint code)
Jump to: navigation, search

Hey guys i just wanted to say i'm sofar a huge hl2 fan and it's friggen awesome how realistic the AI in this game is...and now on to the main subject I like to spice things up a bit when i create an online or a lan game w/ my friends and maybe throw in an npc or two. But it really isn't that interesting because they just sit there and well really don't do jack shit **excuse the language por favor** so it's pretty cool for lets say half a second. If anone knows how to so called "piss off the NPC" in otherwords create an AI script or something. Please let me know. E-mail me at [email protected] I'm sure it'll make not only my online gaming a little more fun :P but yours as well. Thank you... Best Regards Jack Dan

Well it seems no one else will spill the beans on AI Programming with Source so I have started, I will evolve the documents the more I begin to understand them, at the moment I am shifting in content from my private documenting of the AI in Source, to help me understand it better, so I thought I would share, it's more from a programmatic viewpoint (my viewpoint) so feel free to weave in your wealth of AI knowledge you guru's.

--fluxtah 12:52, 3 Aug 2005 (PDT)

I would offer to help, but I'm so out of touch with programming I don't even know where I might be helpful! --TomEdwards 12:53, 3 Aug 2005 (PDT)
Thanks for sharing your information. I'm trying to figure out AI scripting(Response System), and I started reading AI related codes. I'll add my findings as my progress -N-neko

Nice one mate, there is still loads more that could go in, including an example of a working NPC with custom schedules, tasks and conditions to bring it all together.

Also some pathfinding would be good.

--fluxtah 01:21, 4 Aug 2005 (PDT)

Hint code

I feel silly asking this, but could anyone point me towards the code for each hint? I've only been able to find the instructions for the combine mine inhibitor (in the combine_mine source file). None of the other NPCs seem to have anything! --TomEdwards 14:47, 4 Aug 2005 (PDT)

Hints are defined in AI_hint.h. It seems to me FValidateHintType(CAI_Hint *pHint) method in NPC codes defines what kind of hints they are intesrested in. Then hint information is handled via hintCriteria. (I'm looking at npc_playercompanion.cpp FindNewAimTarget() for an example) N-neko