i have added a visible timer at the top corner of my game to show the player how lng they have been playing,
i have made a global variable called clock with inital value to 0, and a text box on the game that is set to update with the clock variable.
how do i add the action to the event sheet to add 1 second to the clock variable every one second
just add it as you stated yourself:
Every 1 second -> increment the global variable by 1
i did this but for some reason it shows the value on the game as, 1.546789326547 seconds something stupid i only want it show the value in seconds as 1 second then 2 seconds rather than every ms
and when it gets to 1 minute to change to 1:00 instead of 60
Without a attached capx from your side, it is hard to tell what you are doing wrong, but please have a look at this example.
thank you very much worked perfect
also do you know how i can make the clock scroll with the screen and player in the platform game rather than going off the screen when the player moves?
Try to use the Anchor to keep it on the screen, Anchor works really well for Hud and Ui.
Develop games in your browser. Powerful, performant & highly capable.