Disable mouse left click?

  • #1, by Simon_ASAFriday, 06. November 2015, 11:43 5 years ago
    Hello!

    I would like to find a way to disable the mouse left clicks for a few milliseconds, and automatically after each click, then enable them again.

    What I tried:
    in the Game settings/Left Mouse actions, I put the following actions:
    Hide cursor
    Pause for 100ms
    Show cursor
    1
    2
    3
    4


    It was working well... except when I use the Hide/Show cursor action somewhere else. In that case, the 2 actions are mixed up and you never know if the cursor will end visible or not. Which is normal...

    So I would like to know:

    - is there a way to check if the cursor is already shown or hidden?
    - or is there another method to disable left click?

    The purpose of this operation is to prevent the player to click all the time like crazy, because sometimes it creates issues with the refresh of views/actions. With a pause of 100ms after each click, the game is not slow at all, and all actions can finish for sure before the next click.

    Don't know if you understand what I try to do, anyway I hope you can reply to my questions above smile Thanks!!

    Great Poster

    321 Posts


  • #2, by afrlmeFriday, 06. November 2015, 13:09 5 years ago
    Use a condition or value & if query.

    When hiding cursor inside of a scene object / character action set a condition & then reset it just before or after you show the cursor again.

    In your action you posted above wrap both the hide & show cursor in an if query.

    Should sort it I think.

    P.S: I don't believe there is anything in the data structure for checking if the cursor is shown or hidden. I didn't find anything when I searched under "mouse". & I already know it's not currently possible to set the cursors via Lua script, so I doubt there's any method for returning the visible state of the mouse cursor.

    Imperator

    6842 Posts

  • #3, by Simon_ASAFriday, 06. November 2015, 16:00 5 years ago
    Mmmh... I can't go in each scene with a show/hide action and add a if querry... The game is too far in the development. That is why I was looking for another way to disable the mouse. Anyway if it's not possible I will just leave it for now. Thanks Lee.

    Great Poster

    321 Posts

  • #4, by ke4Friday, 06. November 2015, 16:17 5 years ago
    The cutscene action part is almost the same as the cursor action part. Could it work with using this?

    Begin of cutscene
    Pause for 100ms
    End of cutscene
    1
    2
    3
    4


    Key Killer

    810 Posts

  • #5, by afrlmeFriday, 06. November 2015, 16:28 5 years ago
    Cut-scenes can be skipped via the ESC key. I'm not sure about if used in combination with hide / show cursor action parts.

    Alternatively you could create a dud command. A command to swap to briefly that is not listed inside of any of your scene objects, characters or items action lists. However if you are using the comment set system then it would probably trigger one of those. Also I don't remember whether or not you were using commands or if you are just using the left click (immediate) actions, seeing as your game is first person & doesn't require any execution at destination commands.

    Imperator

    6842 Posts

  • #6, by Simon_ASAFriday, 06. November 2015, 16:57 5 years ago
    @Ke4
    good idea. It could work, I have to try wink

    @AFRLme
    I have nothing in the left button, it's empty!

    Great Poster

    321 Posts

  • #7, by afrlmeFriday, 06. November 2015, 17:35 5 years ago
    Just opened up one of the ved you sent me before... the left click immediate certainly complicates things. It almost always takes priority over any other left mouse button based action.

    Did Ke4's suggestion work?

    Imperator

    6842 Posts

  • #8, by Simon_ASAMonday, 09. November 2015, 12:26 5 years ago
    It seems to work, but I need more tests to be sure that it doesn't make any problem elsewhere.
    Thanks guys!

    Great Poster

    321 Posts

Write post