Sitting Behaviour for AI: Difference between revisions
Springheel (talk | contribs) No edit summary |
Springheel (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
==Sitting at Map Start== | |||
Just set the spawnarg "sitting" "1" on the AI, and the AI will be sitting at map start. They will also get up when alerted and go back and sit down again after ramping down. | |||
==Sitting During Patrol== | |||
It is now possible to have the AI sitting down and getting up during patrolling, using a '''path_sit''' entity. | It is now possible to have the AI sitting down and getting up during patrolling, using a '''path_sit''' entity. | ||
You can set "wait" and/or "wait_max" to let the AI wait and get up after that time. "Wait" is a minimum wait time, so if you set "wait" to 5 seconds and "wait_max" to 10 seconds, the AI will wait between 5 and 10 seconds every time. If you only set "wait", the AI will always wait exactly 5 seconds. If you only set "wait_max", the AI will wait between 0 and 10 seconds. | You can set "wait" and/or "wait_max" to let the AI wait and get up after that time. "Wait" is a minimum wait time, so if you set "wait" to 5 seconds and "wait_max" to 10 seconds, the AI will wait between 5 and 10 seconds every time. If you only set "wait", the AI will always wait exactly 5 seconds. If you only set "wait_max", the AI will wait between 0 and 10 seconds. |
Revision as of 00:57, 13 February 2009
Sitting at Map Start
Just set the spawnarg "sitting" "1" on the AI, and the AI will be sitting at map start. They will also get up when alerted and go back and sit down again after ramping down.
Sitting During Patrol
It is now possible to have the AI sitting down and getting up during patrolling, using a path_sit entity. You can set "wait" and/or "wait_max" to let the AI wait and get up after that time. "Wait" is a minimum wait time, so if you set "wait" to 5 seconds and "wait_max" to 10 seconds, the AI will wait between 5 and 10 seconds every time. If you only set "wait", the AI will always wait exactly 5 seconds. If you only set "wait_max", the AI will wait between 0 and 10 seconds.
If you don't set either one, the AI will stay seated and you can also do path_anims and path_waits for example (they'll play that animation on the torso channel while sitting).
The AI will get up if alerted to searching state or if it has to move to another position.
AI will now always use the sit down and get up anims.
Example: If you want an AI to sit, and then play a warm hands after 20 seconds, you would use a path_sit without a wait spawnarg (AI sits down, the path_sit task is terminated and the AI stays seated), then a path_wait for 20 seconds, then a path_anim, then another path_wait, and then a path_corner or something (AI gets up and walks to path_corner).