Page 1 of 2

Stupid bots

Posted: Fri Oct 31, 2003 12:44 am
by smartaiguy
OK, Ive got a bot problem. Or shall I say problems.

1. I can only spawn bots form the console

2. They don't do anything they just sit there

Ive got farplanes and all that good stuff set up.

I have machine guns for them to goto but I can push them around and get them to shoot the enemy.

Thanks

Posted: Fri Oct 31, 2003 8:11 am
by jv_map
Hmm maybe you could be a bit more specific?

Did you try setting level.alliesbots and level.axisbots in the script?

Do you get any error messages in the console?

Posted: Fri Oct 31, 2003 1:11 pm
by smartaiguy
jv_map wrote:Hmm maybe you could be a bit more specific?

Did you try setting level.alliesbots and level.axisbots in the script?

Do you get any error messages in the console?
Yes I did level.alliesbots = # and level.axisbots = #

I get no error messages.

When I spawn bots they just stand there. How do I tell them to go for a machine gun?

Posted: Fri Oct 31, 2003 9:15 pm
by smartaiguy
OK HELP!! I can only get bots to spawn manually, but not automatically!

Also my bots go nowhere unless I push them. I've tried setting routes to my machine guns but that doesn't help! Help please!

THanks

Posted: Sat Nov 01, 2003 7:53 am
by jv_map
Could you post your script here?

Posted: Sat Nov 01, 2003 2:15 pm
by smartaiguy
yep:


main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Man your Battlestations!"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Man your Battlestations"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "textures/battlestations/dm_battlestations.tga"
exec global/jv_bots/jv_mp_ai.scr
level waittill spawn

exec global/ambient.scr mus_maintheme


iprintlnbold_noloc "Welcome to Battlestations!!"
iprintlnbold_noloc "by smartaiguy!!"
iprintlnbold_noloc "Now, go man your Battlestations!!"
end

//*** Precache Dm Stuff
exec global/DMprecache.scr

level.script = maps/dm/dm_battlestations_ai.scr

$world farplane_color "0.5 0.5 0.5"

level.fogplane = 6000

$world farplane level.fogplane

level waittill spawn

level.alliesbots = 3

level.axisbots = 3

level.jvbot_tasks_priority[follow] = 2.0

level.jvbot_tasks_priority[machinegun] = 2.0

level.jvbot_weapon_priority["m1 garand"] = 20

level.jvbot_weapon_priority["springfield '03 sniper"] = 10

level.jvbot_weapon_priority["mauser kar 98d sniper"] = 10

level.jvbot_weapon_priority["mauser kar 98k"] = 15

level.jvbot_weapon_priority["mp40"] = 35

level.jvbot_weapon_priority["stg44"] = 30

level.jvbot_skill = 2

waitthread global/jv_bots/jv_mp_ai.scr::enable

end

Posted: Sat Nov 01, 2003 2:36 pm
by smartaiguy
OK, I think I can solve the bots going nowheres problem by dropping them right into the action rather than have a side room. But I'd still like them to go to the machine guns though

Posted: Sat Nov 01, 2003 2:48 pm
by jv_map
Hmm there are a number of issues with your script:

First of all, remove these lines:

exec global/jv_bots/jv_mp_ai.scr

and

end

(about half way down :?)

Also you have two instances of this line:

level waittill spawn

whereas only one is allowed.

Fixing these things I think will solve the bot problems.

Posted: Sat Nov 01, 2003 3:06 pm
by smartaiguy
That should solve my problem. :oops: :oops: Kinda some embarassing mistakes! Thanks!

Posted: Sat Nov 01, 2003 3:15 pm
by smartaiguy
OK that solved my spawning problem, now how do I get the bots to go for the machine guns? I've tried setting up routes but they won't take them.

Also can I set the range of the guys by setting #range/4000 on the spawning postions?

Posted: Sat Nov 01, 2003 3:40 pm
by jv_map
Nope you cannot set a range for bots. Are you sure your machineguns are set up properly?

Posted: Sat Nov 01, 2003 3:48 pm
by smartaiguy
I have them exactly set up as in your bot tut.

Posted: Sat Nov 01, 2003 3:51 pm
by jv_map
Are there enough path nodes nearby so the bots can reach the guns?

Posted: Sat Nov 01, 2003 4:50 pm
by smartaiguy
Yep, I have an almost perfect route system.

How can I tell the bots to take a path when the spawn?

Posted: Sat Nov 01, 2003 4:51 pm
by smartaiguy
Let me check out lakeside real quick

Also I will plop the spawn places into the battle area, so they go at it right away.