ForceUIKeyBJ

Parameters
whichPlayer player
key string
comment

Only call ForceUIKey locally for whichPlayer. Since this emulates a player's actions, it cannot desync, like if player pressed a keyboard button.

note

See: ForceUICancel, ForceUICancelBJ

patch

1.00

Source
Blizzard.j
return type
nothing
Source code
function ForceUIKeyBJ takes player whichPlayer, string key returns nothing
    if (GetLocalPlayer() == whichPlayer) then
        // Use only local code (no net traffic) within this block to avoid desyncs.
        call ForceUIKey(key)
    endif
endfunction