Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (exile, JeyKey II, Grant), 28,605 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rht, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Level Timer? #325871
05/28/10 19:05
05/28/10 19:05
Joined: Apr 2010
Posts: 47
D
Darkmatters Offline OP
Newbie
Darkmatters  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 47
Hi again... does anyone have any ideas about a level timer??
So the timer starts whehn the level begins, in milliseconds, seconds and minutes..... "00:00:00" sort of thing??

I have looked at timer() and total_ticks, but not sure....

Any help as always is really appreicated...

D.

Re: Level Timer? [Re: Darkmatters] #325874
05/28/10 19:24
05/28/10 19:24
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
total_ticks is what you're looking for i guess.

Re: Level Timer? [Re: Joey] #325878
05/28/10 19:47
05/28/10 19:47
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
var milliseconds, seconds, minutes;

function timer_startup() {
timer();
milliseconds = 0;
while(1) {
milliseconds += (timer() / 1000);
if(milliseconds > 1000) {
milliseconds -= 1000;
seconds += 1;
}
if(seconds > 59) {
minutes += 1;
seconds -= 60;
}
wait (1);
}
}


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Level Timer? [Re: Superku] #325897
05/28/10 20:34
05/28/10 20:34
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
won't work if he's using timer() anywhere else.

Re: Level Timer? [Re: Darkmatters] #325902
05/28/10 20:44
05/28/10 20:44
Joined: Apr 2010
Posts: 172
W
wdlmaster Offline
Member
wdlmaster  Offline
Member
W

Joined: Apr 2010
Posts: 172
use total_ticks instead:
Code:
var count,ms,sc,mn = 0;

function count_up() {
	var start = total_ticks;
	while (1) {

	count = (total_ticks - start) / 16 * 1000;
	ms = integer(cycle (count,0,1000));
	sc = integer(cycle (count / 1000,0,60));
	mn = integer(cycle (count / 60000,0,60));

	wait(1);}}



Re: Level Timer? [Re: wdlmaster] #325905
05/28/10 21:08
05/28/10 21:08
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
@Joey: You're right, I'm sorry.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1