Search found 38 matches

by xpali2
Thu Nov 08, 2018 7:41 pm
Forum: Support and Development
Topic: Override a current button?
Replies: 5
Views: 4198

Re: Override a current button?

Its due to the elseif from what i see. If you have all keys in their own if...then blocks then they will not exclude. assume w is down assume a is down --psuedocode if w is down --do stuff W elseif a is down --do stuff a end here if w is true, then we never evaluate a etc. but if we do --psuedocode...
by xpali2
Thu Nov 08, 2018 1:49 pm
Forum: Support and Development
Topic: Override a current button?
Replies: 5
Views: 4198

Override a current button?

So below is the code for my project's character animation and move function. When I press the d key the character moves right and the animation follows. When you hold the d key and then the a key the character moves to the left. When I try the same but press the a key first the character doesn't swi...
by xpali2
Thu Oct 18, 2018 8:07 am
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 17417

Re: Mousepressed not working?

mastermarkus wrote: Wed Oct 17, 2018 8:39 pm In your main.lua you have "love.mouspressed" it should be "love.mousepressed" you were missing an ("e").
Ah, I am a real idiot... Thanks and sorry for wasting your time to all.
by xpali2
Wed Oct 17, 2018 7:15 pm
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 17417

Re: Mousepressed not working?

pedrosgali wrote: Wed Oct 17, 2018 7:02 pm just zip them up and rename from .zip to .love
There it is. A .love file of my project with the directories that it uses. I have tested it on my PC and it works exactly the same as it would in my IDE. So the buttons don't actually seem to print anything.
by xpali2
Wed Oct 17, 2018 6:58 pm
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 17417

Re: Mousepressed not working?

pedrosgali wrote: Wed Oct 17, 2018 6:39 pm No problem, next time if you post a .love file like I did it'll be a lot easier to help you as all the code will be there for us to look at.
Forgive my noobiness, how do I change my seperate lua files into a .love file?
by xpali2
Wed Oct 17, 2018 6:35 pm
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 17417

Re: Mousepressed not working?

The main.lua file should look like this: local menu = require "menu" function love.load() menu_load() end function love.mousepressed(x, y, b) menu_mousepressed(x, y, b) end function love.update(dt) end function love.draw() menu_draw() end Well I'm sure there will be other things in there ...
by xpali2
Wed Oct 17, 2018 6:23 pm
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 17417

Re: Mousepressed not working?

Here's a .love of the file you posted with a main.lua to make it work, if you click in the boxes I drew the function gets called. I don't know what else to tell you. menuhelp.love I got it to launch with a console (windows only) to show that the function is being called. I copied the code you poste...
by xpali2
Wed Oct 17, 2018 6:14 pm
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 17417

Re: Mousepressed not working?

Thanks for your help. Where do I start to analyse why my mousepressed event isn't working? I am pretty clueless at this point. You may have two mousepressed events. You may be declaring it somewhere where it does not execute. The print may be working but not being shown in the output for some reaso...
by xpali2
Wed Oct 17, 2018 6:05 pm
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 17417

Re: Mousepressed not working?

Are you calling the menu_mousepressed function from main.lua? Like: function love.mousepressed( x, y, button, istouch, presses ) menu_mousepressed(x, y, button, istouch, presses) end Othewise how would it know it has to call it? If so, are you sure it isn't calling it? Maybe the coordinates are wro...
by xpali2
Wed Oct 17, 2018 2:00 pm
Forum: Support and Development
Topic: Mousepressed not working?
Replies: 27
Views: 17417

Re: Mousepressed not working?

Well, it's hard to help any further without having something we can look into by ourselves. The code in the OP definitely can't help diagnosing why your love.mousepressed event isn't working. Thanks for your help. Where do I start to analyse why my mousepressed event isn't working? I am pretty clue...