4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Reloading the game clock
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
orko3001
Junior WebHelper
Junior WebHelper


Joined: 19 Nov 2004
Posts: 4

PostPosted: Tue Nov 30, 2004 12:38 pm (12 years, 10 months ago) Reply with QuoteBack to Top

Yet another problem with the game clock.

It seems to work fine on the first level of my game but not on the second.

On the first level it either stops the game when the player reaches a certain score or when the time has run out.

On the second level it doesn't start. I have tryed copying the Start and Done frames but still no luck. I had to rename them as i got an error message.

I have changed the sode as you will see below but this has thrown up some wierd effects as i am sure you will realise: Embarassed

onClipEvent (load) {
startlvl2 = getTimer();
startCount = 10;
}
onClipEvent (load) {
if (_root.gameComplete == true) {
_root.gotoAndStop("donelvl2");
} else {
current = (getTimer()-start)/1000;
elapsed = startCount-current;
_root.counterlvl2 = Math.floor(elapsed);
if (_root.counterlvl2<=0) {
_root.gotoAndStop("donelvl2");
}
}
}

It seems to start the clock before the level starts and stops it just after.

Any advice much appriciated Smile
OfflineView User's ProfileFind all posts by orko3001Send Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.049746 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme