Posted: 4th Sep 2011 12:02
Hi all!

When checking for getpointerpressed, several times in a row in your game logic, sometimes (if not all) all the events gets triggered from just one click, so I made this function that i call before each check, so I'm sure the user has to click again for each event.

+ Code Snippet
//
// Wait until input buffer is clear
//
function clearinputbuffer()

    while getpointerpressed()=1
        sync()
    endwhile

endfunction