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.
| Button | Index |
|---|---|
jump | 0 |
grenade | 1 |
switch_weapon | 2 |
context_primary | 3 |
melee_attack | 4 |
equipment | 5 |
throw_grenade | 6 |
fire_primary | 7 |
crouch | 8 |
scope_zoom | 9 |
night_vision | 10 |
fire_secondary | 11 |
fire_tertiary | 12 |
vehicle_trick | 13 |
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_msSupported Versions
| Version | Supported |
|---|---|
| No | |
| No | |
| No | |
| No | |
| Yes |
See also action syntax.