Search found 17 matches
- Sat Dec 16, 2017 2:41 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
here's the file. It's out there. Thanks. 10 if love.keyboard.isDown("right") then 11 10 + 40 * dt 12 end So you changed all variables to static numbers and also didn't tell lua how it should use the results of your calculations. How should LÖVE/Lua know what these calculations are for? As...
- Fri Dec 15, 2017 7:59 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
- Fri Dec 15, 2017 7:39 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
here's the file. It's out there.
- Fri Dec 15, 2017 7:21 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
... I did as you said, but... ... Not sure if he is trolling!? No you didn't. My attached example is almost the same as your code, and it works. So try to unpack my .love file and look at the code, compare it to your code and find the problem. Also, the error handler tells you exactly where you nee...
- Fri Dec 15, 2017 7:00 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
Sigh...
Fine, but if it doesn't work... I'll kiss Lua and LÖVE goodbye for good.
- Fri Dec 15, 2017 6:55 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
... local square = {} speed = 40 function square.update( dt ) if love.keyboard.isDown("right") then square.x = square.x + speed * dt end if love.keyboard.isDown("left") then square.x = square.x - speed * dt end if love.keyboard.isDown("up") then square.y = square.y - s...
- Fri Dec 15, 2017 6:52 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
... local square = {} speed = 40 function square.update( dt ) if love.keyboard.isDown("right") then square.x = square.x + speed * dt end if love.keyboard.isDown("left") then square.x = square.x - speed * dt end if love.keyboard.isDown("up") then square.y = square.y - s...
- Fri Dec 15, 2017 6:44 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
Now you're using the table again, so it's square.x in your draw callback etc Please consider following a tutorial about variables and tables I know about variables, but I'm doing this. local square function square.update( dt ) if love.keyboard.isDown("right") then square.x = 10 + 40 * dt ...
- Fri Dec 15, 2017 6:34 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
I said "or even". You either use square.speed or use speed and declare the variable. Please consider using some Lua tutorial: http://tylerneylon.com/a/learn-lua/ You won't have such issues anymore! Nah man, love is user friendly. It's just picky about who his friends are I did this: local...
- Fri Dec 15, 2017 6:14 pm
- Forum: Support and Development
- Topic: Game with separate files tryout
- Replies: 32
- Views: 19103
Re: Game with separate files tryout
I said "or even". You either call square.speed or call speed and declare the variable. But I did so! local square = {} speed = 40 And changed this! function square.update( dt ) if love.keyboard.isDown("right") then square.x = square.x + speed * dt end if love.keyboard.isDown(&qu...