View previous topic :: View next topic |
Author |
Message |
lukeyuan
Joined: 30 Oct 2004 Posts: 10
|
Posted: Wed Jan 19, 2005 1:22 am Post subject: every bot guru, Can you do me a favor? |
|
|
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 |
|
Back to top |
|
 |
Tei

Joined: 25 Oct 2004 Posts: 195
|
Posted: Wed Jan 19, 2005 2:27 pm Post subject: 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");
}
... |
|
Back to top |
|
 |
Wazat
Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA
|
Posted: Wed Jan 19, 2005 6:02 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
|