AI patrols
Moderator: Moderators
- StarGeneral
- Sergeant
- Posts: 67
- Joined: Wed Oct 17, 2007 5:21 am
AI patrols
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.
"Si vis pacem, para bellum."
"If you want peace, prepare for war."
"If you want peace, prepare for war."
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 .
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 .
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
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
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
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!
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!
- StarGeneral
- Sergeant
- Posts: 67
- Joined: Wed Oct 17, 2007 5:21 am
- StarGeneral
- Sergeant
- Posts: 67
- Joined: Wed Oct 17, 2007 5:21 am
If that happens deselect everything and start over I get that too .wacko wrote: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...erick wrote:I have always used Bd's way to make a patrol path but I have never had the Ctrl+K quit working...
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!bdbodger wrote:If that happens deselect everything and start over I get that too .
