ui.track(db, "defeated");
// this tracks the number of enemies you've defeated
game.on("victory", onVictory);
// this checks if victory is true, then it runs the onVictory function:
function onVictory(event) {
db.add("defeated", game.defeated);
}
// this tracks how many enemies you've defeated in each game, and adds it to the total. (which can be over multiple games).
I’m not very experienced with the game editor so I’m not sure how you would get the time to count down rather than up.
If you wanted to make it go down from 60sec, the maths would be:
count = 61-(the value shown by ui.track(game, “time”)
But I’m not sure how you would show that. @Chaboi_3000 do you know?