Is there any way to check if NumLock is on in a conditional branch script? I know there is a way in vanilla JavaScript but it doesn't seem to work with MV.
Checking if NumLock is on in a conditional branch
RPG Maker MV SupportHello again!
I couldn't find a way to do this without modifying the RPG_Core's Input function. Create a plugin with this code:
To check just call this object, which works like Bolean (True/False).
Method 1:
Method 2:
I couldn't find a way to do this without modifying the RPG_Core's Input function. Create a plugin with this code:
JavaScript:
Input._onKeyUp=function(a){
this.numLock=a.getModifierState("NumLock");
var b=this.keyMapper[a.keyCode];
b&&(this._currentState[b]=!1);
0===a.keyCode&&this.clear()
};
/*Restart EventListener*/
Input._setupEventHandlers();
To check just call this object, which works like Bolean (True/False).
Method 1:
Code:
<>If Script: Input.numLock
<>Comment: True
<>
<>
End If
<>
Method 2:
Code:
<>If Script: Input.numLock == true
<>Comment: True
<>
<>
End If
<>
Thank you once again! The plugin worked like a charm.
Original thread: https://forums.rpgmakerweb.com/threads/checking-if-numlock-is-on-in-a-conditional-branch.141690/