.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Duck for seconds ?
Old
  (#1)
slash-evil
Guest
 
Status:
Posts: n/a
Default Duck for seconds ? - 04-03-2004

As the title says , could someone give me an example of how to make a bot duck for about 5 seconds ?

is it like this ?????

Code:
pEdict->v.button |= IN_DUCK+5.0<gpGlobals->time)
  
Reply With Quote
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
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com