i could only find the code for if a key is pressed. how would i check if the player is holding down left click? how do i do that with right click? i want to make a skill in an abs that shoots a bullet as long as the player keeps holding down the mouse button
how to check if mouse button is pressed
Javascript/Plugin SupportHere's a list of all script call equivalent of event commands, it's stickied somewhere on this forum.
Under input you can find:
The script call you're searching for is: "TouchInput.isPressed()".
Under input you can find:
Code:
(Input.isTriggered('ok'))
(Input.isRepeated(ok'))
(Input.isPressed('ok'))
(Input.isLongPressed('ok'))
(TouchInput.isTriggered())
(TouchInput.isRepeated())
(TouchInput.isPressed())
(TouchInput.isLongPressed())
(TouchInput.isCancelled())
(TouchInput.isMoved())
(TouchInput.isReleased())
The script call you're searching for is: "TouchInput.isPressed()".
thank you. (TouchInput.isPressed()) works to see if the player is still holding down the left click. but there is no function for that when holding down right click.
if(TouchInput.isCancelled()) will let me shoot 1 bullet when holding down right click but it doesnt continuosly do it like (TouchInput.isPressed()) for when holding down left click. is there a fix for this or a work around?
if(TouchInput.isCancelled()) will let me shoot 1 bullet when holding down right click but it doesnt continuosly do it like (TouchInput.isPressed()) for when holding down left click. is there a fix for this or a work around?
Original thread: https://forums.rpgmakerweb.com/threads/how-to-check-if-mouse-button-is-pressed.78506/