Timer problems

Hi guys,

Got a timer going using this code:

 
own = GameLogic.getCurrentController().getOwner()
 
timer = 300 - own.timer
minutes = int(timer/60)
seconds = int(timer%60)
 
own.Text = str(minutes) + ":" + str("%02i"% seconds)

From blendenzo’s tut. How do I work out when the timer gets to 00:00 and then change the scene? Working it based on the ‘timer’ property doesn’t work :mad:.

Thanks!
Alex

Hello
add a “property” sensor, "interval "one, with Min:0 and Max:1 ->AND-> Set desired Scene
Bye

It’s not working :frowning: I hope I’ve set the property right…

http://www.savefile.com/files/1407183

If anyone could have a look and tell me at is wrong I’d be eternally greatful. And yes, sorry it’s a big file again :stuck_out_tongue:

Thanks, Alex

Oh well…another 24Mb…
I suppose that you want to add the " Lose" scene?!
Set Min: 59 and Max: 60 and change the “message” actuator for a “Scene” one with “Set scene” and “Lose” in the SCE: field.
It should work, I hope?!
Bye

Yep, I shall do. Thanks a lot for downloading these files, OTO. I’ll have to find some way of reducing their size… maybe zip them or something

Thankyou once again for your help

Alex