View Single Post
Re: Duck for seconds ?
Old
  (#2)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: Duck for seconds ? - 04-03-2004

Actually, no.
Its nowhere close to that.

Make a float variable, lets say flFinishDuckTime...
When you want them to hold down the key set it to gpGlobals->time + 5.0 or whatever time measurement you want.

Where the code for holding down buttons normally goes add something like this...

if gpGlobals->time is below flFinishDuckTime then hold down the IN_DUCK key.

I think that's how it goes, though I still wonder if you thought the line you posted was actually valid.
  
Reply With Quote