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!
Getting the mouse to click once?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Sheepolution
- Party member
- Posts: 264
- Joined: Mon Mar 04, 2013 9:31 am
- Location: The Netherlands
- Contact:
Re: Getting the mouse to click once?
http://www.love2d.org/wiki/love.mousepressed
There's a function for that!
Be sure to take a loot at the wiki, to check for a solution for you problem.
There's a function for that!
Be sure to take a loot at the wiki, to check for a solution for you problem.
- rhezalouis
- Party member
- Posts: 100
- Joined: Mon Dec 07, 2009 10:27 am
- Location: Indonesia
- Contact:
Re: Getting the mouse to click once?
Please post your *.love file so that other people could easily fix it on the line.
- Attachments
-
- bransonn-mouseClick.love
- LÖVE 0.8.0
- (1021 Bytes) Downloaded 218 times
Aargh, I am wasting my posts! My citizenshiiiip...
Who is online
Users browsing this forum: Google [Bot] and 4 guests