Quake3World.com Forums
     Programming Discussion
        Making bots walk


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Making bots walk

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44138
PostPosted: 05-02-2013 11:14 AM           Profile   Send private message  E-mail  Edit post Reply with quote


A request I've had often times for my EntityPlus mod is to have an option to make patrolling bots walk and not run. I've tried a few things to get bots to walk, like overriding the "walker" bot characteristic so it's always 1.0 (like the Crash bot has on the easiest difficulty), always passing a walking flag (TFL_WALK) to bot travel flags and even modifying the bot input command so that it always contains the BUTTON_WALKING value (in BotInputToUserCommand() in ai_main.c). Nothing seems to work though. Does anyone have an idea how I can force bots to keep walking and never run?

edit:
The odd thing with the last tried solution I mentioned (editing BotInputToUserCommand()) is that if I try that with BUTTON_GESTURE, the bots keep taunting continually, so that works, but adding BUTTON_WALKING doesn't have the desired effect. Is it overridden somewhere else? Is it ignored perhaps?




Top
                 

Veteran
Veteran
Joined: 17 May 2011
Posts: 159
PostPosted: 05-03-2013 10:07 AM           Profile Send private message  E-mail  Edit post Reply with quote


When I tried EntityPlys, it reminded me a lot of levels I did with a friend in highschool, based on the single player mod "Outpost". In that mod, the developper, I think, created a new class of entities called "monsters" that wasn't based on the Quake 3 bot system (I think ...). The monsters weren't running in all directions like yours are doing now (and like the quake 3 bots usually do), they just go right after you when they see you, going from left to right so they are not too easy to shoot.

I know that might sound like a lot of work, but ... The Quake 3 bot system is also very specialized in imitating human players in multiplayer games, not single player enemies ...

What I noticed, is that in Outpost, the monsters use the standard quake 3 models, so that "monster" class uses the "cgame/cg_players.c" for the rendering and animation managing ...

If you don't know that mod and want to try it out (and if you can't find it on the net), just add me to skype :)



_________________
My blog - My portfolio
---------------------
MJDM2 - DmeatSP01 - DmeatSP02


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44138
PostPosted: 05-03-2013 12:34 PM           Profile   Send private message  E-mail  Edit post Reply with quote


I've got a solution for my problem that seems to work pretty well. It's probably a dirty hack, but who cares ;)

What I did is that I modified BotInputToUserCommand() in ai_main.c to use lower values for ucmd->forwardmove, ucmd->rightmove and bi->speed

In the unedited code, it uses the values 127 or -127. I changed these to 60 and -60 respectively, and this just makes the bots walk instead of run. So now I pass an additional argument to the function which I use to determine if the bot should walk or not, and depending on the value use 127 or 60.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.