Search found 402 matches

by DaedalusYoung
Mon Apr 11, 2016 10:06 pm
Forum: Support and Development
Topic: love2d thinks the number "3" is a bool
Replies: 9
Views: 1347

Re: love2d thinks the number "3" is a bool

This:

Code: Select all

v[3] == 2 and v[2] + 1 or v[3] == 4 and v[2] - 1
seems to return false.
by DaedalusYoung
Mon Apr 11, 2016 8:42 pm
Forum: Support and Development
Topic: Collision with walls
Replies: 5
Views: 1712

Re: Collision with walls

Glad it works :)

Yeah, you don't need to declare them as local, they automatically are:
http://www.lua.org/pil/4.3.5.html wrote:The loop variables are local to the loop body (...)
by DaedalusYoung
Mon Apr 11, 2016 10:33 am
Forum: Support and Development
Topic: Collision with walls
Replies: 5
Views: 1712

Re: Collision with walls

Set the player.canwalk booleans all to true before you start the for loop, and get rid of them in the if col == false block. My guess is that alone should work, but you could also try that once you determined that there is a collision, you iterate the walls table, then as soon as you've found the bl...
by DaedalusYoung
Thu Apr 07, 2016 6:26 pm
Forum: Support and Development
Topic: Anyone need help with small projects?
Replies: 19
Views: 2119

Re: Anyone need help with small projects?

You could always try to see how Code Doodles work and try to make your own, will get you experience and feedback from others how to improve your code.
by DaedalusYoung
Mon Aug 24, 2015 2:26 am
Forum: Support and Development
Topic: [SOLVED]Making a Dress Up Game... Have a Question!
Replies: 8
Views: 1530

Re: Making a Dress Up Game... Have a Question!

Ok, here: for i,v in ipairs(clothesImages) do love.graphics.draw(clothesImages, v.x, v.y) end clothesImages is a table, containing the various images. You can go through this table in order and draw each image. You're sort of doing that, it just needs a minor adjustment. You iterate the table using ...
by DaedalusYoung
Mon Aug 24, 2015 2:04 am
Forum: Support and Development
Topic: [SOLVED]Making a Dress Up Game... Have a Question!
Replies: 8
Views: 1530

Re: Making a Dress Up Game... Have a Question!

You're possibly not calling them by the correct name. How are you loading the images and how are you trying to draw them, precisely? Can you post your code?
by DaedalusYoung
Tue Jul 28, 2015 4:17 pm
Forum: General
Topic: Code Doodles!
Replies: 153
Views: 48932

Re: Code Doodles!

micha wrote:The statements (1) that every possible number can be found inside pi and (2) that the digits are evenly distributed in pi might still be true. I am not sure about that.
There are an infinite number of digits, so every number will appear an infinite amount of times, so yeah, that should be true.
by DaedalusYoung
Tue Jul 28, 2015 3:39 am
Forum: Support and Development
Topic: Moving and Start-Origin Problems after using AnAl
Replies: 2
Views: 438

Re: Moving and Start-Origin Problems after using AnAl

Because you're hardcoding the x and y values: love.graphics.draw(idleright, 40, 50) should be something like: love.graphics.draw(idleright, enemy.x, enemy.y) Btw, you might want to use dt in your move function too: function enemy.move(dt) if love.keyboard.isDown('d') then enemy.x = enemy.x + (10 * d...
by DaedalusYoung
Tue Jul 28, 2015 3:25 am
Forum: Support and Development
Topic: Logic error: love.draw is drawing everywhere!!!
Replies: 3
Views: 727

Re: Logic error: love.draw is drawing everywhere!!!

From what I can tell with this code, it looks like you keep creating new buttons all the time. Even if the window size doesn't change, you keep adding the same buttons over and over. Then when the window resizes, all these hundreds of buttons drawn on top of each other are still there and the game j...
by DaedalusYoung
Sun Jul 19, 2015 6:01 pm
Forum: Support and Development
Topic: Window Icon
Replies: 8
Views: 1485

Re: Window Icon

Works for me on Mac as well.

Btw, don't create a new image in your love.draw function. This function runs every frame, so it will cause all sorts of issues in larger projects. Just create it once (like in love.load) and then you can just draw it whenever you want to.