The touch function will be called continuously for each entity that is
touching on every frame. It sounds like you changed the Touch function
once the player picks the object up, maybe like this?

SetTouch( NULL );

If so you can re-set the touch function when your object is ready to be
touched again.

SetTouch( &CMyObject::MyTouch );

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
British_Bomber
Sent: Wednesday, April 27, 2005 10:43 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Resetting touch() on an objective

I have an objective, much like a flag in CTF, that the player can pick
up and take back to his assigned capture point.  I use a VERY simple
model entity for this, it simply has Spawn, precache, touch and drop
functions. Couldn't be much simpiler.

They all work fine, the Touch sees if the toucher is a player then
attaches the model to the player.  When the player dies, or captures the
object it is dropped.  That all works fine and dandy, however when
someone else goes to pick it up after it has been dropped, or even the
same player comes back to grab their beloved suitcase, it will no longer
attach itself to them.  It's as though the touch function only wants to
work once, or has to be stopped.  I added an EndTouch, or whatever the
exact name is, to the end of my touch function but to no avail.  Am I
making some kind of fundamental flaw on how the touch function works?

Thanks for any help you can offer me

_______________________________________________
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

Reply via email to