How to detect single mouse clicks

From MiniScript Wiki
Revision as of 09:39, 20 November 2021 by SebNozzi (talk | contribs)
Jump to navigation Jump to search
wasDown = false
while true  // press Control-C to exit
	isDown = mouse.button
	if isDown and not wasDown then
		print "Mouse button clicked!"
	end if
	wasDown = isDown
	yield	
end while