Author Topic: Townsfolk bots (UPDATED 3/14/2013)  (Read 15704 times)

any idea why my bots might not be showing up?
You probably did something wrong, can you send me it?

some one should make a Half life/Bioshock SP gamemode with bots


Try making kids?
I hate kids, they're loud and obnoxious :(

Though more seriously; I don't know how to change a bot's scale via script

You probably did something wrong, can you send me it?

ok, I got it to load.
How do I set the appearance when it spawns?
« Last Edit: March 15, 2013, 10:06:21 PM by Gsterman »

ok, I got it to load.
How do I set the appearance when it spawns?
Did you read the development topic in the Development forum? Badspot explains several things you can do with the new bot events

Anyway, wrench the bot's spawn plate and put in onBotSpawn > Bot > setBotAppearance > Custom, that will make your bot look like how you look when it spawns

Did you read the development topic in the Development forum? Badspot explains several things you can do with the new bot events

Anyway, wrench the bot's spawn plate and put in onBotSpawn > Bot > setBotAppearance > Custom, that will make your bot look like how you look when it spawns

I meant in the code when it spawns.
Like the spacemen, it SPAWNS with its suit.
I want mine to have outfit when placed.

I meant in the code when it spawns.
Like the spacemen, it SPAWNS with its suit.
I want mine to have outfit when placed.
By editing this
Code: [Select]
function BlockheadHoleBot::onAdd(%this,%obj)
{
armor::onAdd(%this,%obj);

//Appearance Blockhead
%obj.llegColor =  "0.2 0 0.8 1";
%obj.secondPackColor =  "0 0.435 0.831 1";
%obj.lhand =  "0";
%obj.hip =  "0";
%obj.faceName =  "smiley";
%obj.rarmColor =  "0.9 0 0 1";
%obj.hatColor =  "1 1 1 1";
%obj.hipColor =  "0.2 0 0.8 1";
%obj.chest =  "0";
%obj.rarm =  "0";
%obj.packColor =  "0.2 0 0.8 1";
%obj.pack =  "0";
%obj.decalName =  "AAA-None";
%obj.larmColor =  "0.9 0 0 1";
%obj.secondPack =  "0";
%obj.larm =  "0";
%obj.chestColor =  "1 1 1 1";
%obj.accentColor =  "0.990 0.960 0 0.700";
%obj.rhandColor =  "1 0.878 0.611 1";
%obj.rleg =  "0";
%obj.rlegColor =  "0.2 0 0.8 1";
%obj.accent =  "1";
%obj.headColor =  "1 0.878 0.611 1";
%obj.rhand =  "0";
%obj.lleg =  "0";
%obj.lhandColor =  "1 0.878 0.611 1";
%obj.hat =  "0";

GameConnection::ApplyBodyParts(%obj);
GameConnection::ApplyBodyColors(%obj);
}

For parameters that have "0"; as the value, you can replace the 0 with a new number, for a list of numbers and what they are, i have a handy-dandy list for that
http://pastebin.com/raw.php?i=G8wG6ZBs

By editing this
Code: [Select]
function BlockheadHoleBot::onAdd(%this,%obj)
{
armor::onAdd(%this,%obj);

//Appearance Blockhead
%obj.llegColor =  "0.2 0 0.8 1";
%obj.secondPackColor =  "0 0.435 0.831 1";
%obj.lhand =  "0";
%obj.hip =  "0";
%obj.faceName =  "smiley";
%obj.rarmColor =  "0.9 0 0 1";
%obj.hatColor =  "1 1 1 1";
%obj.hipColor =  "0.2 0 0.8 1";
%obj.chest =  "0";
%obj.rarm =  "0";
%obj.packColor =  "0.2 0 0.8 1";
%obj.pack =  "0";
%obj.decalName =  "AAA-None";
%obj.larmColor =  "0.9 0 0 1";
%obj.secondPack =  "0";
%obj.larm =  "0";
%obj.chestColor =  "1 1 1 1";
%obj.accentColor =  "0.990 0.960 0 0.700";
%obj.rhandColor =  "1 0.878 0.611 1";
%obj.rleg =  "0";
%obj.rlegColor =  "0.2 0 0.8 1";
%obj.accent =  "1";
%obj.headColor =  "1 0.878 0.611 1";
%obj.rhand =  "0";
%obj.lleg =  "0";
%obj.lhandColor =  "1 0.878 0.611 1";
%obj.hat =  "0";

GameConnection::ApplyBodyParts(%obj);
GameConnection::ApplyBodyColors(%obj);
}

For parameters that have "0"; as the value, you can replace the 0 with a new number, for a list of numbers and what they are, i have a handy-dandy list for that
http://pastebin.com/raw.php?i=G8wG6ZBs
ok, but how do I find the colors?
like can I copy them down from the avatar favs?

What i did was go to the color set menu in the avatar menu and just clicked on a color i wanted to use and copied from there

What i did was go to the color set menu in the avatar menu and just clicked on a color i wanted to use and copied from there
ah

What i did was go to the color set menu in the avatar menu and just clicked on a color i wanted to use and copied from there
nevermind, got it to work.
« Last Edit: March 15, 2013, 11:24:21 PM by Gsterman »

ok, but how do I find the colors?
like can I copy them down from the avatar favs?

I wrote a helper function for this.

Start a server, dress how you want your bot to look, open the console and type

Code: [Select]
dumpAvatarSettings( yourName, "optional description of outfit. Cop for instance" );
What you're currently wearing will now appear in the console in a format that you can copy into the onAdd function. Simply close the game, open up your console.log and copy the code.

Though more seriously; I don't know how to change a bot's scale via script
Add this to the onadd function
Code: [Select]
%obj.setScale("1 1 1");You can adjust the "1 1 1" to whatever you want

I hate kids, they're loud and obnoxious :(

Though more seriously; I don't know how to change a bot's scale via script
Make a adult kid? Like an adult that thinks their a little kid.