Detect Mouse Click with Shaz Super Simple Mouse System

I'm using the Shaz Super Simple Mouse System, a convert form RMXP Mouse script by Near Fantastica and SephirothSpawn. The script is really amazing but there is one thing bother me. Is there any script call that i can detect if player left click,right click,..? just like Input Trigger.


Here is the script


http://pastebin.com/TxKQa3WK
Please remove my script from your post and put a link to the original thread instead.


Input Trigger does check for left click and right click.  That's how it works.
Please remove my script from your post and put a link to the original thread instead.


Input Trigger does check for left click and right click.  That's how it works.

I edited it. So if Input Trigger don't do it, is there a way, like a script call to do it?
Input trigger does test for left and right mouse click.


Unless you've modified the script or added another one that overrides it.
Input trigger does test for left and right mouse click.


Unless you've modified the script or added another one that overrides it.

the only thing i moddified is the icon setting,i test with conditional branch to check if c button is pressed, and if i left click, nothing happen


I found this part is your script


#--------------------------------------------------------------------------
# * Mouse to Input Triggers
# key => Input::KeyCONSTANT (key: 0 - left, 1 - middle, 2 - right)
#--------------------------------------------------------------------------
Mouse_to_Input_Triggers = {0 => Input::C, 1 => Input::B, 2 => Input::A}


Do I need to do something with it?
Try testing for Input.repeat instead of Input.trigger - I do think the "button is pressed" part of the conditional branch has timing issues - if the condition is not tested at the exact time the button is pressed there may be issues.


Mouse.trigger?(x) might also work, but you'd have to check what value x needs to have - look for the Mouse module's trigger? method definition, and the comments will tell you.  I think it's 0 for left button and either 1 or 2 for right button).
Try testing for Input.repeat instead of Input.trigger - I do think the "button is pressed" part of the conditional branch has timing issues - if the condition is not tested at the exact time the button is pressed there may be issues.


Mouse.trigger?(x) might also work, but you'd have to check what value x needs to have - look for the Mouse module's trigger? method definition, and the comments will tell you.  I think it's 0 for left button and either 1 or 2 for right button).

I try Input.repat::C and got this error


error1.png


I try Mouse.trigger?(0), and get this when i left click


.error2.png


🙁  
you need to look up the correct syntax.
you need to look up the correct syntax.

what is that? i'm a noob at script, the only thing i could found is 0 - left, 1 - middle, 2 - right, i try and it still not work?


Can you explain more
Show a screenshot of the event where you're putting the script call.
here is the screenshotUntitled-1.png
It's working for me, but the timing has to be exact.  Because you're doing it in an event, that means there's other stuff happening and it's not checking for a mouse press constantly.


Even replacing Mouse.trigger? with Mouse.repeat? doesn't register every single time I press the mouse.


I'm not really sure what the solution is. It works fine in the menus, but that's pure script and not processed by Game_Interpreter.  What is it that you're trying to do?
It's working for me, but the timing has to be exact.  Because you're doing it in an event, that means there's other stuff happening and it's not checking for a mouse press constantly.


Even replacing Mouse.trigger? with Mouse.repeat? doesn't register every single time I press the mouse.


I'm not really sure what the solution is. It works fine in the menus, but that's pure script and not processed by Game_Interpreter.  What is it that you're trying to do?

idk but my pj keep getting the same error, even a blank new one 🙁( 
pj?


What are you trying to accomplish?
pj?


What are you trying to accomplish?

Its Project 😛  sorry
The interpreter got a bug, it constantly skips some frames, so not every button trigger will register.


It has been noticed several times before by users, and I know that Source made a fix for it.


I think it's name was something like "Interpreter Bug Fix" or similar, it is posted on this forum for sure, so you can search for it here.


If that won't fix the issue you get, you will most probably need to search the cause somewhere else.

Original thread: https://forums.rpgmakerweb.com/threads/detect-mouse-click-with-shaz-super-simple-mouse-system.66546/