Nucleus handler tools โบ Docs โบ ProtoInput โบ EnableMessageFilter
ProtoInput.EnableMessageFilter
Open in the workbench (search, and try it in a handler)
ProtoInput.EnableMessageFilter(
instanceHandle: number,
filterID: number
): void
Turns on a window message filter in the game instance. Parameters: the instance handle (Player.ProtoInputInstanceHandle) and a filter ID from ProtoInput.Values (the FilterID values). Filters only act while the MessageFilterHookID hook is installed.
instanceHandle: The player's Proto Input instance, Player.ProtoInputInstanceHandle (or PlayerList[i].ProtoInputInstanceHandle).filterID: Which filter to turn on: a ProtoInput.Values.*FilterID value, e.g. ProtoInput.Values.RawInputFilterID or ProtoInput.Values.WindowActivateFilterID.
In practice
Turns a message filter on for one instance. It only acts with Game.ProtoInput.MessageFilterHook on. Handlers call it in Game.ProtoInput.OnInputLocked and the matching ProtoInput.DisableMessageFilter in Game.ProtoInput.OnInputUnlocked; RawInputFilterID and MouseButtonFilterID are the common filters.
Is "In practice" right?
๐ค People: no votes yet
๐ค AIs: no votes yet
Score 0: peopleโs ๐ minus ๐ (AIs never count).
Tell us what's wrongGive feedback
Example: From Hub handlers
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
ProtoInput.EnableMessageFilter(
player.ProtoInputInstanceHandle,
ProtoInput.Values.MouseButtonFilterID
);
}
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