Page 1 of 2

How do I make bots???

Posted: Sat Jul 17, 2004 8:26 pm
by MasterMind
How do I make bots on a multiplayer map that I made????

I need some help, the tutorials are a bit confusing. :?

Posted: Sat Jul 17, 2004 8:47 pm
by blue60007
Have you read this:

http://www.planetmedal.com/freebrief/mohaa/bots/

What are you stuck on.

Posted: Sat Jul 17, 2004 8:57 pm
by MasterMind
I have read that, that is what was confusing. Where do I put the files that I downloaded of that website?

Posted: Sat Jul 17, 2004 8:59 pm
by MasterMind
When I go to console and type jvbot_addbot_spawn 1 no bots appear. Why is that???

Posted: Sat Jul 17, 2004 9:07 pm
by blue60007
Not sure what files?

But have you added spawn points with the script_origin? And added the necessary lines to the script?

Posted: Sat Jul 17, 2004 9:18 pm
by MasterMind
I dont kno what you are talking about so I guess I haven't. How do I do that??

Posted: Sat Jul 17, 2004 9:25 pm
by lizardkid
please please please TRY to read the manual. it;s very complete and will show you everything you need to know, plz don't ask us to basically write a tutorial on something that someone else already has and is probably more complete. :| :? :!:

Posted: Sat Jul 17, 2004 9:28 pm
by MasterMind
I dont know why I cant spawn bots. Thats where I need help.

Posted: Sat Jul 17, 2004 9:29 pm
by blue60007
OK this is from the manual:

3.1 Adding Bot Spawn Points
You can spawn bots at any entity that has an origin. In general, use the script_origin entity. Do not spawn bots at player spawn positions, as you'll risk players getting stuck in bots. When you've created the script_origins, targetname them ?alliesspawn? for an Allied bot spawn position or ?axisspawn? for an Axis bot spawn position. The bot script will randomly choose between spawn points.




That gives the bots a place to spawn.

Now add the scripting stuff:

9.1 Script File
To get working bots in your map, you need to add a line to your map's script file. Thanks to the easy interface of the bot script, this isn't a difficult job. Add the following line below level waittill spawn. If you have any bombs in your map, you need to add this line below all ?bomb_thinker? lines.

Code: Select all

waitthread global/jv_bots/jv_mp_ai.scr::enable
You might also want to spawn a couple of bots when your map starts. Otherwise, you can only add bots by console. To spawn a set number of bots when your map loads, type:

Code: Select all

level.alliesbots = (number of Allied bots)
 
level.axisbots = (number of Axis bots)
Paste this code just above the enable line from the previous example.

In the end, a part of your script could look like the following example:

Code: Select all

level waittill spawn
 
$bomb thread global/jv_obj_dm::bomb_thinker
 
level.alliesbots = 5
 
level.axisbots = 5
 
waitthread global/jv_bots/jv_mp_ai.scr::enable



Then you would go and add path nodes and such...

Tell me what you still don't understand.

Posted: Sat Jul 17, 2004 9:34 pm
by MasterMind
How do I add to the maps script file???

Posted: Sat Jul 17, 2004 9:38 pm
by blue60007
OK open up notepad, and add those five lines. Next save it as mymapname.scr (of course mymapname should match the name of the map) then stick the .scr with the .bsp in the /main/maps/dm (or obj) folder.

Posted: Sat Jul 17, 2004 9:43 pm
by MasterMind
Should I test it out now?

Posted: Sat Jul 17, 2004 10:07 pm
by blue60007
If you've got the spawn points in your map, and compiled, add teh script. Then fire up the map, and join a team, it should work if you've followed the tut.

Posted: Sat Jul 17, 2004 10:09 pm
by MasterMind
Alright!!

Posted: Sat Jul 17, 2004 10:25 pm
by MasterMind
It worked!!! Thanks

Now I'm wondering how to make a bot move, open doors, or follow me?