Time-based score
SterbenWarStorm
23 Jan 2020, 01:38I am on the web version, and I want to make a time-based score, where at the end of the game, it will display how long it took them. how would I do this?

onimike
24 Jan 2020, 17:47Make a timer called what ever you wish, then tick the run timer when game starts. Now add new script tick variables then tick increase object counter, object is player counter is gamescore (so in code player.gamescore). Now click on tab Game at top find scripts now add a new script to start script, now we find variables tick on set variable or attribute now we set player.gamescore expression 0 this sets the variable so the counter knows what it adding to. Now when you want to gall it before game is over so I made a function called gameover then in code view add this
msg ("It took you " +player.gamescore+ " seconds to finish the game")
wait {
finish
}
Now all you need to have is a way to finish the game like getting an item then on pickup you call this function and thats it. Sorry so long but not as good with online and way more to do just to set a attribute in online version vs desktop version, hope it helps.