every bot guru, Can you do me a favor?

Discuss anything not covered by any of the other categories.
Post Reply
lukeyuan
Posts: 10
Joined: Sat Oct 30, 2004 5:48 am

every bot guru, Can you do me a favor?

Post by lukeyuan »

when we add bot, we have to connect myself to server and then in the console input the 'impulse 100'. I have one question, Can I add bot from server side without the connection intervention?
I tried to input 'impulse 100' on the server side, nothing happens. who can tell me how to solve this problem?
thanks
Tei
Posts: 193
Joined: Mon Oct 25, 2004 12:22 pm

Re: every bot guru, Can you do me a favor?

Post by Tei »

Some engines support "qcexec".
You can have a function that spawn a bot with name "addbot"

Something like this qc code:

void () addbot =
{
Foo();
Bar();
SpawnANewBotStuff();
}

then you can try "qcexec addbot" on console. Of course, you need that "addbot" function, but looks like easy to add to any QC mod.

Another hideous way can be to set a console var to some magic value:

temp1 38

then read temp1 all frames finding this value

float MAGIC_NUM = 38;

....
if (cvar("temp1")==MAGIC_NUM)
{
SpawnBot();
localcmd( "temp1 0\n");
}
...
Wazat
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA

Post by Wazat »

lukeyuan:
To simplify what was said above, a coder would have to modify the mod to test a variable that can be set in a server console instead of relying on impulses.

The temp1 method wouldn't be too hard, actually.
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Post Reply