Nucleus handler tools โบ Docs โบ Game.ProtoInput โบ OnInputUnlocked
Game.ProtoInput.OnInputUnlocked
Open in the workbench (search, and try it in a handler)
Game.ProtoInput.OnInputUnlocked: () => void
Function Nucleus calls each time input is unlocked, once after all instances are set up if input is not locked by then, and when the session ends (before Game.OnStop). It sees the last player's Context.
In practice
Runs once when the player unlocks the input, with no arguments (handlers loop over PlayerList). They undo here what Game.ProtoInput.OnInputLocked did: ProtoInput.UninstallHook, ProtoInput.DisableMessageFilter, ProtoInput.SetDrawFakeCursor(โฆ, false), so the real mouse works normally again.
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
Game.ProtoInput.OnInputUnlocked = function () {
for (var i = 0; i < PlayerList.Count; i++) {
var handle = PlayerList[i].ProtoInputInstanceHandle;
ProtoInput.UninstallHook(
handle,
ProtoInput.Values.GetCursorPosHookID
);
ProtoInput.DisableMessageFilter(
handle,
ProtoInput.Values.RawInputFilterID
);
ProtoInput.SetDrawFakeCursor(handle, false);
}
};
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