WifTutorialSwimming
Overview
Shown when the playerβs character enters a swimming state. Cancels if they climb back onto dry ground or into a vehicle rather than completing naturally.
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.Swimming]".
SetupActivationCriteria(self)
Registers an Event.HumanStateTransition listener on the local player (any state "*" β "Swim.*") that calls self.ActivateTutorial(self, true).
SetupCancellationCriteria(self)
Registers two Event.HumanStateTransition listeners on the local player, both calling self.EndTutorial(self, false): "Swim.*" β "Upright.*" (climbing out) and "Swim.*" β "InVehicle.*" (boarding a vehicle while swimming).
Events
Event.HumanStateTransition(x3) β one wildcard-to-Swimtransition activates;Swim-to-UprightandSwim-to-InVehicleboth cancel.
Notes for modders
- Trigger key:
"Swimming". Self-arms viaSetupActivationCriteria. - The wildcard state filters (
"*","Swim.*","Upright.*","InVehicle.*") suggest a dotted, hierarchical state-machine naming convention for player movement states; only entering/leaving the"Swim.*"subtree matters here. - No
SetupCompletionCriteriaoverride β completes via the inherited 20-second timer, so a player who just keeps swimming without surfacing or boarding a vehicle still has the message auto-clear after 20 seconds.