combat_ignore
combat_ignore controls whether a stalker should accept a potential enemy while scripted logic is active. It is used
for base behavior and quest scenes where combat can be ignored until conditions change.
Parameters
combat_ignore has no scheme-specific section fields in SchemeCombatIgnore.
The runtime state can receive logic overrides from the object registry. In particular, combatIgnoreKeepWhenAttacked
keeps combat ignore enabled when the actor hits the NPC.
Runtime behavior
On reset, the scheme:
- installs an enemy callback on the object;
- subscribes
CombatProcessEnemyManager; - enables the scheme state;
- copies current logic overrides into the scheme state.
The enemy callback asks canObjectSelectAsEnemy. If an enemy can be selected and the NPC is assigned to a smart
terrain, the manager starts the smart terrain alarm. If the actor attacked a controlled smart terrain, the terrain
control is notified.
When the NPC is hit by the actor, the manager disables combat ignore unless overrides keep it active.
Runtime sequence
- Activation creates state without reading a dedicated section.
addcreatesCombatProcessEnemyManagerand stores it on the state.- Reset installs
object.set_enemy_callback(...), subscribes the manager, enables the state, and copies overrides. - The enemy callback records actor combat state when the potential enemy is the actor.
- If the enemy can be selected and the NPC belongs to a smart terrain, the terrain alarm starts.
- Actor hits disable the state unless
combatIgnoreKeepWhenAttackedis set.
Example
[logic]
active = walker@base
combat_ignore = true
[walker@base]
path_walk = base_walk
path_look = base_look
Notes
- The exact
combat_ignoreoverride syntax is parsed outsideSchemeCombatIgnore; this page documents the scheme implementation that consumes the resolved override state. - Enemy selection is rejected when the source and enemy are farther apart than the configured attack distance.
disableclears the enemy callback and unsubscribes the stored manager action.