Skip to content

get_button_time

Description

Reads how long a scriptable button was held into a custom variable, in milliseconds (Reach MCC only).

Parameters

<player> <scriptable_button> <milliseconds_out>

  • <name> — required operand
  • {a|b|c} — choose one alternative
  • [ … ] — optional clause

Scriptable buttons

The second operand is a member of e_scriptable_game_buttons (5 bits on the wire). Values match @blamnetwork/blf.

ButtonIndex
jump0
grenade1
switch_weapon2
context_primary3
melee_attack4
equipment5
throw_grenade6
fire_primary7
crouch8
scope_zoom9
night_vision10
fire_secondary11
fire_tertiary12
vehicle_trick13

Wire indices 14–16 (unknown, unknown_1, unknown_2) exist in the BLF enum but are not supported by MegaloEdit and should not appear in scripts.

Example

megalo
action get_button_time current_player jump button_hold_ms

Supported Versions

VersionSupported
49No
73No
106No
107No
107 (MCC)Yes

See also action syntax.