Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

TIC-80

Fantasy computer for making, playing and sharing tiny games. · By Nesbox

mouse() in javascript

A topic by RK.io created May 24, 2022 Views: 182 Replies: 2
Viewing posts 1 to 2

i don't know how to use mouse function in javascript

Developer(+1)
function TIC()
{ cls(13) m=mouse() x=m[0] y=m[1] left=m[2] print(m[0]+" "+m[1]+" "+left) }

Try the code above. tThe mouse() api returns an array with values [x, y, left btn, middle btn, right btn].

Thank you so much