Getting the mouse to click once?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Posts: 8
Joined: Wed Apr 24, 2013 6:13 pm

Getting the mouse to click once?

Post by Bransonn » Sat May 04, 2013 7:25 pm

I'm currently working on a game, and I want the user to be able to click an "attack" button. Although whenever I use the

' if mouseclick = "l"

Kind of deal, it will CONSTANTLY ATTACK. I understand what it's doing, but I'm not sure how to make it so only registers the attack ONCE, and ONLY after the release of the click. I've been exploring different things, but haven't found any answers :/

Thank you!

User avatar
Party member
Posts: 254
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands

Re: Getting the mouse to click once?

Post by Sheepolution » Sat May 04, 2013 7:29 pm

There's a function for that!

Be sure to take a loot at the wiki, to check for a solution for you problem.

User avatar
Party member
Posts: 100
Joined: Mon Dec 07, 2009 10:27 am
Location: Indonesia

Re: Getting the mouse to click once?

Post by rhezalouis » Sun May 05, 2013 1:00 pm

Please post your *.love file so that other people could easily fix it on the line. :huh:
LÖVE 0.8.0
(1021 Bytes) Downloaded 52 times
Aargh, I am wasting my posts! My citizenshiiiip... :o

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests