D
deadant88
Guest
Hi all,
I have hunted around for a solution to this and tried a bunch of different approaches but nothing seems to work.
I am trying to get my game to display the time a player survived on the title screen. When the player hits enter on the "title_rm" the game starts, the timer starts, when the player dies, the player is returned to the "title_rm" I'd like to make it so the time survived in the previous round is then displayed on the the title screen.
Here is my code in the obj_player create:
Here is my code in the obj_player step:
I then created an "obj_title_timer" to draw the previous time achieved onto the title but this is where I get stuck trying to call up the timer from the previous round. Predictably because the "global.timer" is set to 0 it just shows 0.
I hope that makes sense, I'd be grateful for any advice.
Cheers.
I have hunted around for a solution to this and tried a bunch of different approaches but nothing seems to work.
I am trying to get my game to display the time a player survived on the title screen. When the player hits enter on the "title_rm" the game starts, the timer starts, when the player dies, the player is returned to the "title_rm" I'd like to make it so the time survived in the previous round is then displayed on the the title screen.
Here is my code in the obj_player create:
Code:
global.timer = 0
Code:
global.timer = global.timer + 1/30;
Code:
draw_set_colour(c_red);
draw_text(300, 192, "best time: " + string(global.timer));
Cheers.