I've gotten OnUse working with:
virtual int ObjectCaps( void ) { return BaseClass::ObjectCaps() |
FCAP_IMPULSE_USE; };
virtual void Use( CBaseEntity *pActivator, CBaseEntity *pCaller,
USE_TYPE useType, float value );
Can't get OnTakeDamage working though, I have:
virtual int OnTakeDamage( const CTakeDamageInfo &inputInfo );
In the header of my entity, but it doesn't fire in game.... Do I need
another part of ObjectCaps? Either way I now have a basic health system
working (Still using an input to remove life since I can't get OTD to work)
so that's good.
Thanks!
On Fri, Mar 26, 2010 at 10:03 PM, Jorge Rodriguez <[email protected]> wrote:
> 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.
>
> --
> Jorge "Vino" Rodriguez
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders