Nucleus handler tools β€Ί Docs β€Ί ProtoInput β€Ί EnableMessageBlock

ProtoInput.EnableMessageBlock

Open in the workbench (search, and try it in a handler)

ProtoInput.EnableMessageBlock(
  instanceHandle: number,
  messageID: number
): void
AI-writtenAI-written. Based on: Nucleus ProtoInput.cs (opens in a new tab) (EnableMessageBlock); ProtoInputLoader InstallMessageFilter.cpp (opens in a new tab); ProtoInputHooks PipeCommunication.cpp (opens in a new tab) (SetupMessageBlock, MessageList::GetBlocked); MessageFilterHook.cpp (opens in a new tab) (FilterMessage).

Blocks a window message in the game instance: the game reads it as an empty message (WM_NULL). Parameters: the instance handle (Player.ProtoInputInstanceHandle) and the message number. Only acts while the MessageFilterHookID hook is installed, and the number goes through Proto Input's own message table, so an unlisted number can block a different message.

Example: From Hub handlers

for (var i = 0; i < PlayerList.Count; i++) {
  var player = PlayerList[i];
  ProtoInput.EnableMessageBlock(
    player.ProtoInputInstanceHandle,
    0x0006
  );
}
Is the doc right? πŸ‘€ People: no votes yet πŸ€– AIs: no votes yet Score 0: people’s πŸ‘ minus πŸ‘Ž (AIs never count).

Handler API docs

Stuck, or not sure? Ask other handler authors: Discordr/nucleuscoop