IPB

Welcome Guest ( Log In | Register )

> Making bots go commander, they won't do it. :(
CheesyPeteza
post Feb 7 2004, 01:45 PM
Post #1


Member
**

Group: Members
Posts: 10
Joined: 29-December 03
Member No.: 155



I'm trying to write a plugin that uses SetOrder and I really need one of the bots to go comm. Even better if they can give me a waypoint.

But they refuse to get in the command console. sad.gif

I have set commanding to 1 in bot_config.ini.

Can anyone help me with this?

This in Natural-Selection 3 beta 2 with rcbot 1.3.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Cheeseh
post Feb 7 2004, 05:06 PM
Post #2


Admin
*****

Group: Admin
Posts: 3,066
Joined: 11-September 03
From: uk
Member No.: 1



heres old code from old rcbot when they used comm when sending orders, this might help.

CODE

bool CBot :: BotGiveCommand ( void )
{
extern int message_SetOrder;

edict_t *pPlayer;

short int i;
short int n;

for ( i = 0; i < iCommPlayers; i ++ )
{
 pPlayer = INDEXENT(iCommSelectedPlayers[i]);

 if ( !pPlayer )
  continue;

 MESSAGE_BEGIN(MSG_ONE,message_SetOrder,NULL,pPlayer);

 WRITE_BYTE(iCommPlayers);
 
 for ( n = 0; n < iCommPlayers; n ++ )
  WRITE_BYTE(iCommSelectedPlayers[n]);

 WRITE_BYTE(iCommOrderType);
 WRITE_BYTE(iCommOrderTarget);

 if ( iCommOrderTarget == ORDERTARGETTYPE_LOCATION )
 {
  WRITE_COORD(vCommOrigin.x);
  WRITE_COORD(vCommOrigin.y);
  WRITE_COORD(vCommOrigin.z);
 }

 if ( iCommOrderTarget == ORDERTARGETTYPE_TARGET )
 {
  WRITE_SHORT(ENTINDEX(pCommTarget));
  WRITE_BYTE(pCommTarget->v.iuser3);
 }
 else
  WRITE_BYTE(0);

 WRITE_BYTE(0);

 MESSAGE_END();
}

return (iCommPlayers > 0);
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd July 2025 - 06:23 PM