Hint Group Functions
SetHintGroup
Sets NPC's hint group
Syntax
SetHintGroup [hint group1],[hint group2],[hint group3], ..
-- Sets hint groups for NPC
Example
// from ai_mission_pw.p3s
xpt_SetHintGroup
{
actions
{
SetAttr "rand 0"
ChangeAttr "rand 0:3"
IfAttr "rand == 0 SetHintGroup wish_fun_droch"
IfAttr "rand == 1 SetHintGroup wish_fun_drink"
IfAttr "rand == 2 SetHintGroup wish_fun_watch"
IfAttr "rand == 3 SetHintGroup wish_fun_strip"
RemoveAttr rand
}
}
SetAreaGroup
Sets NPC's area group(s)
Syntax
SetAreaGroup [Group1]:[walkable],[Group2]:[walkable],[Group3]:[walkable], ..
-- Sets area groups for NPC
:[walkable] is optional
SetAreaGroup AG_DEFAULT
-- Resets NPC's area group
SetLeanGroup
Sets NPC's lean group(s)
Tip
Decompile dcr.bsp
to analyze how a Lean group works.
Syntax
SetLeanGroup [Group1],[Group2],[Group3], ..
-- Sets lean groups for NPC
AvoidProhibitedArea
Sets NPC to avoid prohibited areas
Syntax
AvoidProhibitedArea [boolean]
// (From ai_freeroaming.p3s)
// this AI will refuse to walk out from it's set area group
behavior
{
name bh_mexico_roam_police
inherited bh_police
States
{
st_init
{
Group Neutral
Patterns
{
pt_default
{
actions
{
ExecutePattern bh_base:st_init.pt_default
SetAreaGroup AG_DEFAULT,AG_border
AvoidProhibitedArea true
}
}
}
}
}
}