Game Development Community

Bots...

by Nathan Cox · in General Discussion · 05/10/2008 (5:40 am) · 1 replies

Well, I've managed to make some bots appear when typing spawnAllServerObjects(); in the console. I've also made some bot dialogs and stuff but for some reason I can't figure out how to make it so when you press action on the bot it turns and faces you and the bot dialog comes up.

Does anyone know a way around this or how to figure it out?

Here is the bot spawn script:


function spawnAllServerObjects() {

// Bots:
%bot = AIPlayer::spawn("Marshal", "adminBody", "397.519 240.902 217.101 0 0 -1 1.53897");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "JailDlg";

%bot = AIPlayer::spawn("Orc Marshal", "adminBody", "1565.76 1111.34 223.811 0 0 -1 0.915784");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "JailDlg";
%bot.setDataBlock("orcBody");

%bot = AIPlayer::spawn("Post Master", "adminBody", "335.759 231.196 213.489 0 0 0.999932 0.031059");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "PostDlg";

%bot = AIPlayer::spawn("Orc Post Master", "adminBody", "1498.26 1161.55 223.381 0 0 1 3.81461");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "PostDlg";
%bot.setDataBlock("orcBody");

%bot = AIPlayer::spawn("Guild Master", "adminBody", "349.422 192.636 218.333 0 0 -1.00094 0.00497951");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "GuildDlg";

%bot = AIPlayer::spawn("Orc Guild Master", "adminBody", "1539.16 1231.35 223.794 0 0 1 2.32494");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "GuildDlg";
%bot.setDataBlock("orcBody");

%bot = AIPlayer::spawn("Quest Master", "adminBody", "274.364 182.869 213.214 0 0 1 2.35955");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "QuestDlg";

%bot = AIPlayer::spawn("Orc Quest Master", "adminBody", "1528 1119.13 223.398 0 0 1 0.647516");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "QuestDlg";
%bot.setDataBlock("orcBody");

%bot = AIPlayer::spawn("Banker", "adminBody", "337.639 231.142 213.489 0 0 0.999932 0.031059");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "BankDlg";

%bot = AIPlayer::spawn("Orc Banker", "adminBody", "1496.75 1162.75 223.382 0 0 1 3.81461");
%bot.isGod = 1;
%bot.isBot = 1;
%bot.dialog = "BankDlg";
%bot.setDataBlock("orcBody");
}

I hope this isnt too hard...

#1
05/16/2008 (7:43 pm)
How do you have BankDlg, GuildDlg, PostDlg, etc defined? What does the code look like for "action"?

People are usually willing to help, but you need to make sure you provide all the necessary information.