Talk:Thinking

From Valve Developer Community
Revision as of 12:29, 17 September 2009 by TomEdwards (talk | contribs) (moved Talk:Think() to Talk:Thinking)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Very impressive! Useful topic & helpful implementation, I'm sure it'll be much appreciated! The wiki could definately do with more "how does X work?" articles. --Winston 09:02, 23 Feb 2008 (PST)

Yours isn't too bad either. :-) --TomEdwards 09:10, 23 Feb 2008 (PST)

Calling SetThink()

I am unable to call SetThink() from inside Think(), is this a known truth? --Empbox

What happens if you try the SetThink() code from the article? --TomEdwards 09:12, 4 August 2009 (UTC)
You mean the CMyEntity example? Not sure. I did use this article as a quick reference, and SetThink() just wouldn't run from inside Think() to save my life. (SetNextThink() did though!). Finally I just dumped Think(), made a custom think function, added it to DATADESC and SetThink() runs fine. I was just checking to see if this is intentional (coded elsewhere) or if I'm the only one in the world with this prob.., er, inconvenience :)
Weird. What are you inheriting from? --TomEdwards 10:17, 7 August 2009 (UTC)
CLogicalEntity --Empbox 11:59, 7 August 2009 (UTC)
Got it: if you override Think(), you've got to put a call in to BaseClass::Think(). --TomEdwards 14:54, 7 August 2009 (UTC)