Page 1 of 1
AI patrols
Posted: Tue Nov 06, 2007 4:54 am
by StarGeneral
Ok, I want to know what the script is to make an AI patrol in a multiplayer map without all that objective crud in it, I just want the guy to walk to 4 pathnodes in a complete circle over and over again, please tell me what to take out of the script to do this.
Posted: Tue Nov 06, 2007 5:42 am
by bdbodger
Create 4 pathnodes and give the first one a targetname . For example
Key: targetname
Value: patrolpath1
Select the first pathnode and then the second one and press control K
The second node with then be the only node selected . Select the third node and use control K again . So on and so on with the last node targeting the first node to form a circle . Put lots of normal pathnodes in between them max distance about 300 units apart .
Create an ai and press i to open the ai panel . Set his type_idle to patrol and on the right side a box called patrolpath will appear set his patrolpath to patrolpath1
That is the simple version there is also a patrol script that is harder to set up but has options like having him stop and look at certain areas .
Posted: Tue Nov 06, 2007 9:40 am
by wacko
couldn't repeat your steps here
Even Ctrl+K didn't do anything here. I additionally gave the other info_pathnodes targetnames too, connected them manually, didn't help either.
Could you post a link to a map showing this?
Posted: Tue Nov 06, 2007 12:06 pm
by bdbodger
It maybe because your ai animations are not enabled . You have to mod models/human/new_generic_human.tik . Here is a sample map with a moded new_generic_human.tik . It has an allied guy on one side of a wall and a german guy on the other . Both have sight and hearing set to 0 . The .map file is in the pk3
user_patrol.pk3
With selecting one thing and using control k to target another . Some of the time you have to press esc to deselect everything then try it . Select one entity then another press control k and entity 1 will target entity 2 . Also a variation on this is to set his type_idle to runner and instead of patroling he will run the path . Set it up the same way with type_idle set to runner and the patrolpath in the box provided . You can also use the bots from JVbots they are ai that use a moded new_generic_human.tik that JV has named multiplayer_generic_human.tik
Posted: Tue Nov 06, 2007 12:32 pm
by wacko
Many thanks for the pk3
Didn't know about having to mod MOH to make it work, so probably I haven't done so.
I will examine everything once I'm back home 2night.
My procedure of connecting pathnodes seem to be like u described it. Will give it another try aswell.
tnx again
Wacko
Posted: Tue Nov 06, 2007 3:56 pm
by bdbodger
Your welcome I forgot about modding the new_generic_human.tik because that is something I did long ago to enable the ai animations . I like to use the bots in Jvbots because the animations are already enabled or I create custom ai and use the multiplayer_generic_human.tik it is missing only a couple of animations I found out lately that is does not have the cabinet animation for the global/cabinet.scr but thats easly fixed I just have this at the bottom of the tik for my ai .
$include models/human/multiplayer_generic_human.tik
$include models/human/animation/scripted/hiding_cabinet.tik
$include models/human/animation/dialogue/generic_dialogue_german.tik
Posted: Tue Nov 06, 2007 7:27 pm
by wacko
Okidoki, now it's working using your new_generic_human.tik
Then, I must confess that I dont know anything about tik manipulation (and never needed to), so I don't get much of what u're trying to explain
On the other hand, atm I'm fine with what I have now. So you don't have to teach me any further, althought it might be of interest to others.
My Radiant is still denying to react on Ctrl+K; it IS in the radiant.ini, so no idea why...
Thanks for your help mate!
Posted: Thu Nov 08, 2007 5:21 am
by StarGeneral
lol, Wacko pretty much pointed out all the probs I had thorughout the process. Thanks for the help

Posted: Thu Nov 08, 2007 6:04 am
by bdbodger
Are you guys sure you are holding down the control key when you press the k key ?
Posted: Thu Nov 08, 2007 6:36 am
by wacko
bdbodger wrote:Are you guys sure you are holding down the control key when you press the k key ?
I swear it DIDN'T work last time, no matter how I tried
Now... it does

Posted: Fri Nov 09, 2007 1:09 am
by StarGeneral
I believe you Wacko...I've been there...many a time.
Posted: Fri Nov 09, 2007 10:30 pm
by erick
I have always used Bd's way to make a patrol path but I have never had the Ctrl+K quit working...

Posted: Sat Nov 10, 2007 12:05 am
by wacko
erick wrote:I have always used Bd's way to make a patrol path but I have never had the Ctrl+K quit working...

When Ctrl+K isn't working, it isn't specific to Bd's pathnodes, I can't connect e.g. windows and their func_objects either, all I get is a Windows XP Error sound...
Posted: Sat Nov 10, 2007 7:29 am
by bdbodger
wacko wrote:erick wrote:I have always used Bd's way to make a patrol path but I have never had the Ctrl+K quit working...

When Ctrl+K isn't working, it isn't specific to Bd's pathnodes, I can't connect e.g. windows and their func_objects either, all I get is a Windows XP Error sound...
If that happens deselect everything and start over I get that too .
Posted: Sat Nov 10, 2007 11:48 am
by wacko
bdbodger wrote:If that happens deselect everything and start over I get that too .
You're so right. Although nothing was visibly selected before I selected the nodes (script_objects, whatever), it didn't work. But, pressing ESC (deselect) first and then select the two does work. Thanks for your patience and help!