[hlcoders] Do entities need to think to process things like being Hit, etc?

2010-03-26 Thread Matt Hoffman
Simple question, I'm making an entity (Let's call it a building) which has health and it's health can go up when the player uses it or down when it's hit. How often would this entity need to think for this? Maybe I'm just confused as to what Thinking entities do on their own. Cheers, Matt

Re: [hlcoders] Do entities need to think to process things like being Hit, etc?

2010-03-26 Thread Jorge Rodriguez
I think what you want to do would be done best not through thinking but with the entity OnUse and OnTakeDamage functions. Check out how things like buttons and breakables do that. To answer your question no I don't think entities need to have a think function in order to process other things. --

Re: [hlcoders] Do entities need to think to process things like being Hit, etc?

2010-03-26 Thread Matt Hoffman
I've gotten OnUse working with: virtual intObjectCaps( void ) { return BaseClass::ObjectCaps() | FCAP_IMPULSE_USE; }; virtual voidUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); Can't get OnTakeDamage working though, I have: virtual

Re: [hlcoders] Do entities need to think to process things like being Hit, etc?

2010-03-26 Thread Jorge Rodriguez
Got me. I think there's a flag somewhere that turns OnTakeDamage on and off. Look around in the base entity damage functions. -- Jorge Vino Rodriguez ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: