Re: Wait/Pause/Sleep?
Posted: Sun Apr 07, 2013 2:27 pm
Can you upload a .love file?
Nope. It's only in the update function, and that's all. I put this line in the update function:T-Bone wrote:You're not putting dt as argument to the love.draw function, are you? It should be to love.update, nothing else.
Code: Select all
love.graphics.print(dt, 100, 200)
Done!Jackim wrote:Can you upload a .love file?
No. Don't do this. It's better to use or design a timer library and use those. I threw my own together for use in my own game and there's a few here you can use.Plu wrote:It's probably a better idea to doThe above would keep the CPU running all the time, which probably isn't neccesary.Code: Select all
love.timer.sleep( 5 )
Thank you! So if I understand correctly, for anything that requires timers or the utilization of 'dt' I will need to always put those calculations in the actual built-in update function instead of the 'pcall' one?Jackim wrote:The way you've set up your code, for whatever reason, makes it so dt doesn't work in your update function.
I put it in the love.update built in function and it works fine.