[quake2] Quake 2 'entities' help

Asfand Yar Qazi email at asfandyar.cjb.net
Tue Feb 8 16:28:26 EST 2005

Brendan Burns wrote:
> Asfand,
> All of the entities have a "think" slot that contains a function.  The 
> "think" function is called by the game engine every time through the 
> game loop.  It makes them do whatever it is they're supposed to do.  It 
> also has an animation sequence attached to it that makes the characters 
> animate.  Each entity actually has multiple functions that it uses as 
> the "think" function depending on its state (and the state of the game) 
>  As an example, if you look in m_infantry.c you'll see functions like 
> "run" "pain" etc which implement those actions.  The AI is basically a 
> deterministic finite automata (you may have seen that in a computer 
> science course sometime).
> hope that helps.
> --brendan

I was only expecting a link to a website, and I get a mini-lecture 
.....wow, bless you!

That makes things a bit clear.  The concept of the animation sequence 
attached to it is intriguing.  That means, that every 'think', the 
think function tells the entity which animation to play until the next 
'think'.  Am I right?

More information about the quake2 mailing list