Author Topic: why is bot not working  (Read 8339 times)

The button used varies between keyboards. To me, it's the ¬/`/| button below Escape, but for some it's the #/~ tilde key.

Unless you've remapped it because your tilde key doesn't work in Blockland. asdf

I'll assume that he can't have remapped the key if he couldn't access the console :cookieMonster:

you press ` which is to the left of 1, and is there command to clear all bots?

anyone know the command?

bot.delete();
bot2.delete();
....

you'll have to keep track of the names of each bot you've created

bot.delete();
bot2.delete();
....

you'll have to keep track of the names of each bot you've created

You could store their IDs in an array when you create them:

Code: [Select]
$botID[$botCount++]=new AIPlayer(...
And then just use a for loop to clear them:

Code: [Select]
for(%i=1;%i<=$botCount;%i++) { $botID[%i].delete(); }

You could store their IDs in an array when you create them:

Code: [Select]
$botID[$botCount++]=new AIPlayer(...
And then just use a for loop to clear them:

Code: [Select]
for(%i=1;%i<=$botCount;%i++) { $botID[%i].delete(); }

yes, this was closer to what i was looking for... i had accidentally created multiple bots with the same name when i entered the code and had a syntax error, thanks.

The script is BASIC? Not much knowledge of scripting yet but i am about to learn it..

The script is BASIC? Not much knowledge of scripting yet but i am about to learn it..

When you say "BASIC," are you emphasizing the simplicity of these codes or are you referring to the scripting language BASIC? If the latter, this is Torque, not BASIC.

When you say "BASIC," are you emphasizing the simplicity of these codes or are you referring to the scripting language BASIC? If the latter, this is Torque, not BASIC.
Ye right, i forgot for a moment this was torque..I just saw some bit of script and it looked like BASIC (scripting language indeed)..so i was like:"OMG LOL BASIC got to post that!"
Sorry for the interruption..but i am sure this will come in handy..thanks

Is there a way to let them be a horse or something? (Instead of eventing a brick with: on bot touch_bot_change datablock_horse)

Instead of PlayerStandardArmor as the datablock, try HorseArmor.


IT works!

PS: Did you guys know that if you download the airboat or mech (don't matter which) that you get them as player datablock too! so just type this:
new AIPlayer(bot) { datablock="MechArmor"; position=localclientconnection.camera.getPosition(); };
and a mech bot will apear!

PPS: you can make more then 2 bots! just type:
new AIPlayer(botX) { datablock="PlayerStandardArmor"; position=localclientconnection.camera.getPosition(); };
but then instead of the red X, you have to type a number, or something else (like botobama)

PPPS: Please STICKY THIS TOPIC!!!