IPB

Welcome Guest ( Log In | Register )

> Spawning bots in CSS
HeavyDelta
post Jan 22 2007, 04:06 AM
Post #1


Member
**

Group: Members
Posts: 12
Joined: 23-October 06
Member No.: 909



Although the bots spawn fine in HL2DM. There's a small problem with CSS. They join the game, join teams, yet remain dead on the scoreboard and don't physically spawn in the game.

I think this is probably due to changes over time in CSS's spawning code.

Is there anything I need to add here? perhaps code to select model/skin as well as team?:

CODE

void CCSSBot :: startGame ()
{
    // do whatever is necessary here to join the game...
    IPlayerInfo* pInfo = playerinfomanager->GetPlayerInfo(m_pEdict);

    pInfo->ChangeTeam(RandomInt(2,3));
}


Also, why is the code "RandomInt(2,3)"? (I'm assuming this randomly picks either 2 or 3)
I thought teams were 1=T, 2=CT, 5=autoselect.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Cheeseh
post Jan 22 2007, 03:29 PM
Post #2


Admin
*****

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



Yeah I noticed that bug, it used to work before which is weird. Try changing the RandomInt to 1,2 and try again

It is probably the team number problem . It is really bizzarre though because I just recently fixed a team number problem for The Specialists in Rcbot1, and I'm sure that even worked before. Although looking at the code it seems completely stupid because it was entirely wrong, I don't understand how it ever worked before.
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: 22nd August 2025 - 03:13 PM