ListenEvents
Makes an entity listen for game events.
Postal III Ultrapatch+Angel v1.3.0+ Feature
The following function will only work in Postal III Ultrapatch+Angel v1.3.0 or higher.
Note
Uses events from ModEvents.res
Syntax
ListenEvents 1 -- Turns on or off to listen for game events.
Will call OnEvent_[eventname] P3S events dynamically.
Example
behavior
{
name bh_npc_myentity
inherited bh_military_new
States
{
st_init
{
Group Neutral
Patterns
{
pt_default
{
actions
{
ListenEvents 1
AvoidProhibitedArea false
ExecutePattern "bh_military_new:st_init.pt_default"
}
}
}
}
}
events
{
OnEvent_p3_player_hurt "PrintAttr OnEvent_p3_player_hurt"
OnEvent_p3_npc_hurt "PrintAttr OnEvent_p3_npc_hurt"
OnEvent_player_death "PrintAttr OnEvent_player_death"
}
}