Search found 7 matches

by sololove2d
Wed May 27, 2020 3:56 pm
Forum: Support and Development
Topic: How to use "self" properly?
Replies: 6
Views: 883

Re: How to use "self" properly?

Thanks a lot. After played around for a while, I found out the way duaner mentioned works best for me.
by sololove2d
Wed May 27, 2020 12:47 am
Forum: Support and Development
Topic: How to use "self" properly?
Replies: 6
Views: 883

Re: How to use "self" properly?

Thanks. I thought I could use "self" within the function when defining it.
by sololove2d
Tue May 26, 2020 11:34 pm
Forum: Support and Development
Topic: How to use "self" properly?
Replies: 6
Views: 883

How to use "self" properly?

When I create a table for a character, I can do it this way: h01 = {} h01.body = love.physics.newBody(runWorld, 350, 100, "dynamic") h01.shape = love.physics.newRectangleShape(66, 92) h01.fixture = love.physics.newFixture(h01.body, h01.shape, density) Note h01.fixture are using previously defined pr...
by sololove2d
Sat May 23, 2020 12:20 pm
Forum: Support and Development
Topic: Can't get out of a loop in a function?
Replies: 4
Views: 619

Re: Can't get out of a loop in a function?

Thanks lot. I will check out timer.lua.

When you say game loop, that means every dt frame?
by sololove2d
Fri May 22, 2020 8:47 pm
Forum: Support and Development
Topic: Can't get out of a loop in a function?
Replies: 4
Views: 619

Re: Can't get out of a loop in a function?

After some debugging. It seems that the if statement check with the random number is not executing for some reason. if skillOut > t.difficulty then player.direction = directionOrigin player.clear = true elseif skillOut <= t.difficulty then player.direction = -directionOrigin end Could not find out w...
by sololove2d
Fri May 22, 2020 7:35 pm
Forum: Support and Development
Topic: Love2d Mac Setup
Replies: 3
Views: 924

Re: Love2d Mac Setup

If you are using Atom, try this:

https://atom.io/packages/love-launcher
by sololove2d
Fri May 22, 2020 6:45 pm
Forum: Support and Development
Topic: Can't get out of a loop in a function?
Replies: 4
Views: 619

Can't get out of a loop in a function?

First post, please be gentle :P I Wrote a function, that I WOULD LIKE it to do the following: When player sprite runs to certain x, y. Player sprite will not move for 1.5 second. During this 1.5 sec, showing a turning coin. After this 1.5, roll a random number, if greater than N, player sprite conti...