Mouse clicks with autoclicker not always detecting

Discussion in 'Legacy GameMaker Community Tech Support' started by FeNniX, Jan 24, 2019.

  1. FeNniX

    FeNniX Member

    Joined:
    Jan 24, 2019
    Posts:
    16
    I created simple project. Default room, default object.

    In objects code I have written:
    in global mouse press event: health--
    in draw event: draw_text(50,50,health)

    Whenever I click with mouse in game, everything works. But if I try to use autoclicker, clicks are not always detected. Sometimes health reduces, sometimes stays the same. Why does this happen?
     
  2. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,351
    Your autoclicker likely either clicks too often (thus causing the game to think that the mouse is being held down as that's what it looks like as of frame start) or holds the button for too little (thus causing the game to miss the time when the mouse was held down).

    Usually the highest safe frequency for autoclickers is (framerate/2.x)/second - wait for a frame and a bit, hold for a frame and a bit, wait again. Pick something safe like 1.5 frames if the game is not running at full speed
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice