GetPlayerControlsDisabledAltEx

From GECK
Jump to: navigation, search


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

Description

Returns true (1) if any of the specified player controls are currently disabled, and false (0) otherwise.

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.

The disabledHow arg can be used to check how the controls were disabled. Here are its possible values and uses:

 If 0, check if controls are disabled by calling mod (DisablePlayerControls*Alt/AltEx* only)
 If 1, ... disabled by any mod (DisablePlayerControls*Alt/AltEx* only)
 If 2, ... disabled by any mod OR disabled by vanilla DisablePlayerControls

Unlike GetPlayerControlsDisabledAlt, 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 disabledHow at 0, and *all* the flag bits at 1, meaning it will check if any of the flags are disabled by the calling mod.

Syntax

[help]
(bool) GetPlayerControlsDisabledAltEx disabledHow:int{0} flags:int

Example

GetPlayerControlsDisabledAltEx

Returns 1 if any of the player's controls are currently disabled by the calling mod.

GetPlayerControlsDisabledAlt 0 (1 << 2)

Returns 1 if the player's Pip-Boy is currently disabled by the calling mod.

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