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
every bot guru, Can you do me a favor?
Re: every bot guru, Can you do me a favor?
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");
}
...
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");
}
...
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.
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.