How do I make bots???

Please use this forum to ask all your MoHAA Bots questions / discussions

Moderator: Moderators

User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

How do I make bots???

Post by MasterMind »

How do I make bots on a multiplayer map that I made????

I need some help, the tutorials are a bit confusing. :?
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

Have you read this:

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

What are you stuck on.
Image
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

I have read that, that is what was confusing. Where do I put the files that I downloaded of that website?
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

When I go to console and type jvbot_addbot_spawn 1 no bots appear. Why is that???
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

Not sure what files?

But have you added spawn points with the script_origin? And added the necessary lines to the script?
Image
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

I dont kno what you are talking about so I guess I haven't. How do I do that??
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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. :| :? :!:
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

I dont know why I cant spawn bots. Thats where I need help.
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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.
Image
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

How do I add to the maps script file???
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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.
Image
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

Should I test it out now?
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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.
Image
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

Alright!!
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

It worked!!! Thanks

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