If you want to get a few more units of FPS, only do this and other input command checks 5 or 6 times per second. This will be essential if you have lots of buttons being checked
//Vanilla DBP
If LastCheck < Timer()
LastCheck = Timer() + 100
// Code
EndIf
// Matrix1
If Ticker(InputInterval)
// Code
EndIf
or check the mouse click condition before performing the distance calculation. Short circuit:
Function MouseCircle(centerX, centerY, radius, button)
If MouseClickButton = button
If DistanceCheckTrue
ExitFunction 1
EndIf
EndIf
EndFunction 0
Quote: " If I remember correctly, you can only get the mousex(), mousey(), mousemovez(), mouseclick(), etc once per sync."
Quote: "If I remember correctly, you can only get the mousex(), mousey(), mousemovez(), mouseclick(), etc once per sync"
It is only mouse move commands that you can only use once per loop.
But storing the values in variables is good. MouseClick() calls are 3 times slower than referencing a variable