.:: 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
check for the powerups in op4ctf...
Old
  (#1)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default check for the powerups in op4ctf... - 29-06-2004

here it is
Code:
void BotClient_Gearbox_StatusIcon(void *p, int bot_index)
{
   static int status;
   if (messagestate == 0)
      status = *(int *)p;
   else if (messagestate == 1)
   {
      if (FStrEq((char *)p, "item_ctfregen"))
         bots[bot_index].bHasRegen = (status != 0);
      else if (FStrEq((char *)p, "item_ctfljump"))
         bots[bot_index].bHasLongJump = (status != 0);
      else if (FStrEq((char *)p, "item_ctfphev"))
         bots[bot_index].bHasPhev = (status != 0);
      else if (FStrEq((char *)p, "item_ctfaccel"))
         bots[bot_index].bHasAccel = (status != 0);
      else if (FStrEq((char *)p, "item_ctfbpack"))
         bots[bot_index].bHasBpack = (status != 0);
   }
}
about what those variables mean:
Code:
   // powerups in OpFor CTF
   bool bHasRegen; // Ammo Regen Power-Up
   bool bHasLongJump; // Jump Pack Power-Up
   bool bHasPhev; // Shield Power-Up ("Portable HEV")
   bool bHasAccel; // Accelerator (Death) Power-Up
   bool bHasBpack; // Health Power-Up ("Backpack")

Last edited by Whistler; 29-06-2004 at 16:41..
  
Reply With Quote
Re: check for the powerups in op4ctf...
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: check for the powerups in op4ctf... - 29-06-2004

...and for everyone's information, it's exactly the same code in Counter-Strike with the bomb/buy zone/defuse kit icons

status = 0: not displayed
status = 1: displayed
status = 2: displayed and blinking



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
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