For some reason when I try to set a conditional branch that detects when a player left-clicks, the branch repeats like the condition is met every frame. This same setup works fine with normal button-pressed conditions and even other scripted keybinds work. Is the mouse input always pressed, or am I missing something obvious?
MZ Play SE ONCE after player left clicks mouse
Javascript/Plugin SupportHi, I hope I can help you, check this method:
Frames are to avoid lag with other events in parallel process
About IF with Boolean
Sorry about my bad English.
Edited:
Sorry, I simplified it, it is not necessary to use an Rpg Maker variable for this.
Good luck
JavaScript:
◆If:Script:TouchInput.isPressed()
◆Loop
◆If:Script:!TouchInput.isPressed()
◆Play SE:Bite (90, 100, 0)
◆Break Loop
◆
:End
◆Wait:10 frames
◆
:Repeat Above
◆
:End
◆Wait:10 frames
About IF with Boolean
!TouchInput.isPressed() if touch/mouse is pressedTouchInput.isPressed() if touch/mouse is releasedSorry about my bad English.
Edited:
Sorry, I simplified it, it is not necessary to use an Rpg Maker variable for this.
Good luck
THIS WORKS! Thank you so much!
Original thread: https://forums.rpgmakerweb.com/threads/play-se-once-after-player-left-clicks-mouse.139915/