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. 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

Note: there appear to be three extra entries, but no name for them can be found making them presumably unusable in megalo 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.