Steven Guy wrote:

>> But every frame he needs to check whether he is within distance to use
>> the object capping key.

Not really. What you do is make a BOOL to tell if you are capturing at
point. Then when a player presses the key bound to +capture check to see if
the player can capture this point and is in fact at a point. If the player
can then check if the BOOL is TRUE. If it is true then check the timer. If
the timer is 0 set the BOOL to FALSE. Now for the case that the player
presses the key bound to +capture and the BOOL is FALSE. If the check for
the point is true and the BOOL is FALSE then set the BOOL to TRUE and start
the timer.

For the -capture command just set the BOOL to FALSE and reset the counter.

I think he meant, if I start capturing a point, and keep the key held down and start moving away from the point, the capture should stop (once I get far enough away).

If I were doing a "capture the point"/"defuse the bomb"/"milk the cow"
function, I would prevent player movement once the capture has begun
(pressing movement keys would do nothing while capturing).  The player
would still be free to rotate in place and look around (why assume that
I can't hold a button down just because I can't see it?  I'm able to
hold the handle on the gas/petrol pump down without looking directly at
it while pumping gas/petrol).  If the player wanted to move while
capturing, they would have to make a conscious effort to release the
capture key before any movement keys would be enabled.

But that's just me.  I'm crazy like that, wanting to make behaviors in a
game be similar to what they are in real life.  You can (and will)
obviously implement the feature however you want to.  :)

--
Jeffrey "botman" Broome


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



Reply via email to