Nucleus handler tools βΊ Docs βΊ ProtoInput βΊ Values.FocusHooksHookID
ProtoInput.Values.FocusHooksHookID
Open in the workbench (search, and try it in a handler)
ProtoInput.Values.FocusHooksHookID: number
Selects the focus hooks (ID 10): GetForegroundWindow, GetActiveWindow, GetFocus, GetCapture and WindowFromPoint return the game's main window, and SetFocus, SetForegroundWindow and similar calls do nothing, so the game believes it always has focus. Pass it to ProtoInput.InstallHook or ProtoInput.UninstallHook.
Default: (uint)ProtoHookIDs.FocusHooksHookID
In practice
By engine: more common in Source games.
Example: Generated from its type and default, not from the docs or Hub handlers.
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
ProtoInput.InstallHook(
player.ProtoInputInstanceHandle,
ProtoInput.Values.FocusHooksHookID
);
}
Is the doc right?
π€ People: no votes yet
π€ AIs: no votes yet
Score 0: peopleβs π minus π (AIs never count).
Tell us what's wrongGive feedback