Search found 17 matches

by All0utWar
Mon Dec 26, 2011 12:24 am
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

Here is one of your problem s : elseif state == 'GameIsOver' then love.graphics.print(string.format('%.2f', b), 10, 10) end Here is part 1 of the solution: if state == "GameIsPlaying" then a = love.timer.getTime() end Here is part 2 of the solution: Just (a - b). So I put, if state == 'Ga...
by All0utWar
Sun Dec 25, 2011 3:07 pm
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

Not sure how to make it a .love file.
by All0utWar
Sun Dec 25, 2011 5:05 am
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

Okay, when I go to the end screen, the timer shows .75 which was the amount of time it took to load the game. It shows this everytime I go to that screen. Also, the timer still starts at the main menu regardless of that code you posted.
by All0utWar
Sat Dec 24, 2011 7:26 pm
Forum: Support and Development
Topic: Attacking Functions.Please Help![.love]
Replies: 6
Views: 4148

Re: two zombies one room.

Couldn't you just make it so the second zombie goes into the room first?
by All0utWar
Sat Dec 24, 2011 7:21 pm
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

Okay well, these should be the last few questions in THIS thread. (I hope) Anyway, whenever I take b out of the timer, the time changes from what it was while playing. It's like the time just says how much time it took to load the game and when I go back to play and then go to the end game screen, ...
by All0utWar
Sat Dec 24, 2011 4:47 am
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

Okay well, these should be the last few questions in THIS thread. (I hope) Anyway, whenever I take b out of the timer, the time changes from what it was while playing. It's like the time just says how much time it took to load the game and when I go back to play and then go to the end game screen, t...
by All0utWar
Sat Dec 24, 2011 12:45 am
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

Wow, I feel like a complete retard for not seeing how easy this is.
by All0utWar
Sat Dec 24, 2011 12:33 am
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

Robin wrote:You can use

Code: Select all

string.format('%.2f', your_number)
example:

Code: Select all

print(string.format('%.2f', 3.1290423094))
-- prints 3.13
If you want to change the number of digits to something other than 2, use that instead of 2.
So, this would go in love.update or love.draw?
by All0utWar
Sat Dec 24, 2011 12:10 am
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

Robin wrote:You simply stop updating a when the game is over.
Alright, one more question. Is it possible to shorten the amount of digits in the number? Like, it goes 1.734611324. Then when I go to the end screen the number is a lot longer.
by All0utWar
Fri Dec 23, 2011 6:38 pm
Forum: Support and Development
Topic: How would I create a timer?
Replies: 28
Views: 10952

Re: How would I create a timer?

How would I get the timer to stop and post the time when the game is over though?