Ok, i have my code:
the clock starts when the program is run and after 8 secs, FIVE moves position.Code:int seconds; clock_t clock(); seconds = clock()/CLOCKS_PER_SEC; if (seconds == 8){ FIVE.SetPositionX(-1); } //.... if ((AdventureGame.keypressed[DIK_F]) && (WOO.positionX == -10)){ //reset clock() here FIVE.SetPositionX(-5); }
When i press F, i want FIVE to reset its position [which it does], and to reset the clock(), so that after 8 secs, FIVE will move again.
Anyway to do this?
Using Windows 7, visual studio



LinkBack URL
About LinkBacks


