EnablePlayerControlsAltEx

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender version 6.3.2.

Description

Enables the player's controls after use of DisablePlayerControlsAlt / DisablePlayerControlsAltEx.

Disabling and enabling is stored on a per-mod basis, so if two mods disable a control at some point, it will be disabled until both of them re-enable it, or until the save is reloaded.

This will NOT override the controls disabled with the vanilla DisablePlayerControls.

Unlike EnablePlayerControlsAlt, this function takes a single arg, flags. It is a Bitmask, with each bit representing a flag for a control to disable. See the Flag Definitions section for more info.

Default (no parameters) is equivalent to having *all* the flag bits at 1, meaning it will re-enable all controls.

Syntax

[help]
EnablePlayerControlsAltEx flags:int

Example

EnablePlayerControlsAltEx

Player's controls are completely enabled, at least from the calling mod's point of view. If other mods are still disabling those controls, then they'll stay disabled until those other mods re-enable the control too.

On top of this, vanilla DisablePlayerControls can also leave controls disabled, and the only way to turn it back on at that point is to use vanilla EnablePlayerControls. However, it shouldn't typically be necessary to go override whatever vanilla scripts are currently doing, so this can safely be ignored.

EnablePlayerControlsAltEx ((1 << 0) | (1 << 1))

Re-enables the Movement and Looking flags, from the calling mod's point of view.

Flag Definitions

Flag Names
Bit Value Description
Movement 1 << 0 Player movement is disabled. Activation of world objects is disabled. HUD is partially disabled: Action Points, Health, Crosshair.
Looking 1 << 1 Player looking is disabled -- the player's view is locked into its current position.
Pipboy 1 << 2 Player cannot bring up the pip-boy interface. The "Wait" menu will also be disabled.
Fighting 1 << 3 Player cannot bring up a weapon. If the player currently has a weapon out, the weapon will be holstered.
POV 1 << 4 Player cannot go into 3rd person view. If currently in 3rd person, the view is forced into first person.
RolloverText 1 << 5 No rollover text on world objects.
Sneaking 1 << 6 Player cannot go into sneak mode. If currently sneaking, forces you out of sneak mode.
//== New custom flags
Attacking 1 << 7 Prevents the player from attacking with their weapon, but they can still draw it out.
EnterVATS 1 << 8 Prevents the player from opening VATS.
Jumping 1 << 9 Prevents the player from jumping.
AimingOrBlocking 1 << 10 Prevents the player from aiming or blocking with their weapon.
Running 1 << 11 Prevents the player from running; they will be forced to slowly walk.
Sleeping 1 << 12 Prevents the player from sleeping. New in v6.3.5.
Waiting 1 << 13 Prevents the player from waiting. New in v6.3.5.
FastTravel 1 << 14 Prevents the player from fast travelling. New in v6.3.5.

See Also