WifTutorialCollateralDamage
Overview
Shown when the player deals collateral damage to a civilian or neutral. The message auto-hides after 10 seconds; both activation and completion are guarded so a re-trigger while already active canβt stack a second completion timer.
Inheritance
- Inherits from:
MrxTutorial(src/resident/mrxtutorial.lua) β a real corpus module, already documented under Resident Modules, not an opaque native-only engine class despite this file living insrc/vz/. - Imports: none
Instance pattern
A subclass of the corpusβs MrxTutorial task-framework base class β self-based lifecycle overrides, not the Inheritable/uGuid object pattern used in resident/. Per-instance state: self._CompleteEvent, the guard/handle used by both overrides below.
Functions
GetMessage()
Returns the fixed message key "[Tutorial.Collateral]".
ActivateTutorial(self, bDontNetSync)
Overridden: only calls MrxTutorial.ActivateTutorial(self, bDontNetSync) if self._CompleteEvent isnβt already set β guards against a re-trigger while the tutorial is already active from re-arming the completion timer.
SetupCompletionCriteria(self)
Same guard: only creates the 10-second Event.TimerRelative (β self.EndTutorial(self, true)) if self._CompleteEvent isnβt already set, storing the handle in that field.
Events
Event.TimerRelativeβ 10-second completion delay, guarded to fire only once per activation viaself._CompleteEvent.
Notes for modders
- Trigger key:
"CollateralDamage". NoSetupActivationCriteriaoverride in this file β confirmed sole call site:MrxFactionManagercallsMrxTutorialManager.StartTutorial("CollateralDamage", true)as part of its civilian-casualty penalty handling, alongside a cash penalty and faction-relation cues. - The
self._CompleteEventguard on bothActivateTutorialandSetupCompletionCriteriameans callingActivateTutorialagain while already active is a safe no-op β the same guarded pattern used byWifTutorialTrespass.