Discord
Login
Community
DARK THEME

click detection

How do I tell if the mouse clicks something?


For example in a start menu how do I get it to tell when I press play?

You have to make a range that the mouse can click. For example,

every 1 millisecond do

if mouse.x > variable1-20 then

if mouse.x < variable1+20 then

if mouse.y > variable2-20 then

if mouse.y < variable2+20 then

if mouse.pressed then

dosomething = 2

end

end

end

end

end|

Something along these lines would work.

thanks

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community