Jump to content


Photo

How to make a timer with hi-scores?


  • Please log in to reply
2 replies to this topic

#1 lrmlrm

lrmlrm

    GMC Member

  • New Member
  • 22 posts
  • Version:GM8

Posted 27 June 2012 - 02:08 PM

Okay ill get straight to the point. Im making a survival zombie type game. But instead of rounds i want it so there is a timer going up and then when i die, it stops and that goes into a scoreboard

Unfortunately i used the global variable "score", as my money system for buying guns so if you write the code for my problem, keep that in mind :)

Thanks in advance, you guys always help me out :)
  • 0

#2 robinsblade

robinsblade

    GMC Member

  • GMC Member
  • 663 posts
  • Version:GM8

Posted 27 June 2012 - 02:21 PM

Okay ill get straight to the point. Im making a survival zombie type game. But instead of rounds i want it so there is a timer going up and then when i die, it stops and that goes into a scoreboard

Unfortunately i used the global variable "score", as my money system for buying guns so if you write the code for my problem, keep that in mind :)

Thanks in advance, you guys always help me out :)



you can do this simple

first make a timer

global.Timer = 0

then have a step event

if alarm[0] < 1 {alarm[0] = room_speed*1}


alarm[0] event

global.Timer += 1


then you have to make a score board yourself bc its to complicated for me to explain

then at the end of the game make the alarm stop

alarm[0] = false

and then have something record the time

global.EndScore = global.Timer

then that will be the score for that game

you need to have it record to a scoreboard but idk atm how to do that it bc i have not made a scoreboard for any games ive made
  • 0

#3 Noele

Noele

    GMC Mentor

  • GMC Member
  • 2406 posts
  • Version:GM8.1

Posted 27 June 2012 - 02:22 PM

Check out my Custom High Score Tutorial. It shows you how to add your own custom data to the high score.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users