Skip to reading
Action Lists & Events

33. Restore controls after a special mode

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page

An inspection or cinematic mode often changes several independent things: player input, pointer visibility, movement profile, GUI visibility and camera ownership. Make a small restore plan before adding the effect.

Source table from 33. Restore controls after a special mode, page 38
Entering inspectionLeaving inspection
Disable player input if required.Restore that input switch; other active locks can still apply.
Show the inspection GUI.Hide the inspection GUI.
Activate the inspection camera.Stop any orbit and activate the intended normal camera.
Hide or adapt the pointer deliberately.Restore the intended pointer/device behavior.
Start any temporary sound/effect.Stop the named channel/effect or let it finish safely.

Set Runtime Controls Enabled controls the control-profile feature as a whole. Set Player Input Enabled controls the player-input switch. Hiding the mouse pointer controls its presentation. Those commands do different jobs; they are not interchangeable locks.

Use explicit enabled/disabled states for cleanup. Toggle is convenient for a repeatable switch, but calling a cleanup toggle twice can leave the feature in the wrong state. Track temporary modes with a variable when several exits share the same restoration logic.

Test Close, Escape/back, scene change, dialogue interruption and cutscene skip where those exits exist. A sequence that restores control only on its happy path can leave the player stuck.

Page 38 of 189Permalink
Go to page