Blockland Forums > Modification Help
AI Players
<< < (3/7) > >>
(MoA) Shaun:
wtf, there is an aiPlayer script? o.O
Aloshi:
That pretty much just spawns the freaky black bots found in F11.

They won't do much without proper programming...
Nitramtj:
Yes, the programming is up to the scripter, not me =)
I'll through out another piece of code for you to use:

--- Code: ---//GameConnection::ApplyBodyParts(%client);
//GameConnection::ApplyBodyColors(%client);
//This code works on bots only if you make their .client and .player = themselves
GameConnection::ApplyBodyParts(%bot);
GameConnection::ApplyBodyColors(%bot);
//to find the names of appearance prefs do %client.dump (when %client is a client object)
//The appearance variables are pretty noticable

--- End code ---

Good luck getting bots to do what you want! I'll be around if anyone needs more help, but I won't get too specific always.
Skylord321:

--- Quote from: VerticalHorizon on March 22, 2007, 05:08:02 PM ---Nitramj is the person to ask this.

--- End quote ---

heh.. i asked nitramtj how to make bots and stuff and i ended up given him the idea ^^" but yea i made a bot mod its simple realy i added it to 00002 when i get home ill give you the code or just use simple things like this

//the heart of the whole thing
function botfollow(%bot,%client)
{
if(%bot.following $= "1")
{
echo("This bot is already in use");
echo("Use the stop command to stop it");
}
else
{
%player = %client.player;
//the command that moves the bot
%bot.setmovedestination(%player.getposition);
//this next thing makes it so you can't make a bot follow 2 objects or it will be a little glitchy
%bot.following = 1;
%bot.lawl = schedule(100,100,refreshbot);
}
}

//make the bot refresh
function refreshbot(%bot,%client);
{
%player = %client.player;
//the command that moves the bot
%bot.setmovedestination(%player.getposition);
%bot.lawl = schedule(100,100,refreshbot);
}

//stop the bot with this
function stopbot(%bot)
{

%roflmao = %bot.lawl;
cancel(%roflmao);
}


the spawn command ill put later this stuff mite not work cause
i made it up just barley when i get home Like i said i will upload my
aiplayer.cs onto my site www.sihous.com then i will put a link

hope thios helps :x
fishpen0:
Woah,so when are you gonna upload?
Navigation
Message Index
Next page
Previous page

Go to full version