Search found 7 matches
- Wed May 27, 2020 3:56 pm
- Forum: Support and Development
- Topic: How to use "self" properly?
- Replies: 6
- Views: 4443
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.
- Wed May 27, 2020 12:47 am
- Forum: Support and Development
- Topic: How to use "self" properly?
- Replies: 6
- Views: 4443
Re: How to use "self" properly?
Thanks. I thought I could use "self" within the function when defining it.
- Tue May 26, 2020 11:34 pm
- Forum: Support and Development
- Topic: How to use "self" properly?
- Replies: 6
- Views: 4443
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 ...
- 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: 3175
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?
When you say game loop, that means every dt frame?
- 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: 3175
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...
- Fri May 22, 2020 7:35 pm
- Forum: Support and Development
- Topic: Love2d Mac Setup
- Replies: 3
- Views: 3422
- 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: 3175
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...