IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> 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
Cheeseh
post Feb 7 2004, 01:48 PM
Post #2


Admin
*****

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



They dont even attempt to use it because they cant do anything anyway, what would be the point.

the setorder is buggy as well, the orders stay even after you've done them, there must be a better way of doing them.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Depot
post Feb 7 2004, 01:50 PM
Post #3


Member
**

Group: Members
Posts: 49
Joined: 15-October 03
Member No.: 91



If you'll search through these forums a bit, you'll see where the bot's ability to comm was disabled a couple of versions ago, as teh dev has been unable to get the necessary info from Flayra and krew to do it. rolleyes.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
CheesyPeteza
post Feb 7 2004, 02:38 PM
Post #4


Member
**

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



OK thanks for your help.

I've noticed that to remove an order you resend the same SetOrder message made to make the waypoint, but change the last byte to 1. Well thats my untested theory anyway just from looking at the messages ns sends out.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Feb 7 2004, 05:06 PM
Post #5


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
CheesyPeteza
post Feb 8 2004, 07:03 PM
Post #6


Member
**

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



That seems to be pretty much the way I figured it out too, although I hadn't considered that you could leave out the origin or target type.

I have my plugin working now anyway. smile.gif

BTW there is a group of us trying to detail every NS message. If you have any additions they would be welcome. The list is here.

Any additions you have can be posted here.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post

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: 22nd July 2025 - 10:29 AM