You do have the SetNextThink( gpGlobals->curtime + whatever ); as well, correct?
On Wed, Jun 9, 2010 at 5:51 PM, Klaus Müller <tloeffl...@googlemail.com>wrote: > Hey, I've decided to move a good portition of my own code out of the > CBaseCombatCharacter class in basecombatcharacter.cpp and into a new > source file. I created a new class inherited from CBaseEntity because I > need the class to think. However, calling a SetNextThink( > gpGlobals->curtime ); doesn't show any effect; the Think function of the > entity isn't called at all. The class declaration has the DECLARE_CLASS > as well as DECLARE_DATADESC macro. I defined the think function via > > BEGIN_DATADESC( CMyClass ) > DEFINE_THINKFUNC( MyThink ) > END_DATADESC() > > and also set the appropriate think function in my class constructor, > i.e. SetThink( &CMyClass::MyThink ); > > This is basically the exact same as I previously did when the functions > were still part of CBaseCombatCharacter and not a separate class. I > create a static instance of the class when the player touches a certain > trigger. When touching the second trigger, a member function of CMyClass > is called which, at the very end, calls the SetNextThink(). I've read > through the Think() article on VDC over and over again, looking out for > something I might have missed, but I just can't find anything. I'm > grateful for any insight. > > Cheers! > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- -Tony _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders