Re: [hlcoders] Resetting touch() on an objective

2005-04-27 Thread Jeffrey \botman\ Broome
British_Bomber wrote:
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?
Are you setting the Owner variable on the carried object to the player
that carries it?  If so, make sure the owner is set back to NULL when
dropped otherwise the same player can't touch it again (you don't touch
things that you are the Owner for).
--
Jeffrey botman Broome
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


RE: [hlcoders] Resetting touch() on an objective

2005-04-27 Thread Matt Boone
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



Re: [hlcoders] Resetting touch() on an objective

2005-04-27 Thread British_Bomber
Thanks so much guys, got the problem sorted (For the most part ) and
working perfectly :D :D

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders