WifTutorialC4Switch
Overview
A narrower, separate C4 tutorial about the detonator switch itself. Activates as soon as the player picks up a C4 charge and completes as soon as they equip C4 β there is no timer involved in either direction.
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/. No module-level or per-instance state beyond what the base class itself tracks (_tEvents).
Functions
GetMessage()
Returns the fixed message key "[Tutorial.C4Switch]".
SetupActivationCriteria(self)
Registers a persistent Event.WeaponEvent listener (_CreatePersistentEvent, not the plain _CreateEvent most other tutorials use for activation) for the player picking up "C4 Pickup", calling the bare global ActivateTutorial β which resolves through inheritance to MrxTutorial.ActivateTutorial since this file doesnβt define its own; equivalent in effect to self:ActivateTutorial(true) since self is passed explicitly in the callback args.
SetupCompletionCriteria(self)
Registers an Event.WeaponEvent listener for the player equipping "c4" that calls self.EndTutorial(self, true). No timer of any kind is involved β completion is purely event-driven.
Events
Event.WeaponEvent(x2) β a persistent listener for picking up"C4 Pickup"arms the tutorial; a plain listener for equipping"c4"completes it.
Notes for modders
- Trigger key:
"C4Switch". Self-arms viaSetupActivationCriteria, using a persistent event for activation β seeMrxTutorialfor what_CreatePersistentEventguarantees versus the plain_CreateEventmost other tutorials in this category use. - No
SetupCancellationCriteriaoverride (inherited no-op), and no timer-based completion at all β this tutorial only ever ends by the player equipping C4 (or via an external manager call). - Distinct from, and presumably shown around the same time as,
WifTutorialC4β that one is keyed on reserve ammo and detonator use, this one on the pickup-then-equip sequence.