How to make an in-game timer that displays at the end of the game [Difficulty 🟨 ]

What you will need;
Lifecycle x1
Repeater x1
Counter x1
Wire Repeater x1
Item Granter (or anything else to do blocks with) x1
Property x3
End Of Game Widget x1

First, place your lifecycle, you do not need to edit any options for this.

Next, place a repeater. Set its “task interval” to 1.0 and set “Stop Strategy” to “After receiving on channel”. Now go to all options. Set “Trigger On Task Start” to “No”.

Third, wire the lifecycle to start the repeater and place a property. Set the name to “Timer”. Now place another property and name it “seconds”. Change the “Property Type” to “Number”. Place one more property and name it “minutes”. Change the “Property Type” to “Number”.

Fourth, place a counter and set “Update Property” to “Yes”. Now set the “Property To Update” to “seconds”. Make the counter have a goal of 59.

Now, wire the repeater to the counter like this; “Repeater Runs Task” to “Increment Repeater”. Place a wire repeater and wire the counter to the wire repeater. Wire the wire repeater back to the counter. Wire it to reset the counter.

Now place the item granter. Wire the repeater to the item granter. Do “When Repeater Runs Task” to “Run Wire Pulse Block”. Make a block on “On wire pulse…” and make this;

image

Make one more block on “On wire pulse…” and make this;

NOTE: This only does up to four minutes. To make it longer repeat this process and increase the amount of seconds by 60 and increase the value by 1 each time.

Finally, place an end of game widget and set the “Property” to “Timer”. Now set the “Label” to “Time”.

Congrats, you are done! If you liked it please leave a :heart: and if you have any questions please comment.

-RandomKid

7 Likes

Difficulty?

  • :white_large_square:
  • :green_square:
  • :yellow_square:
  • :orange_square:
  • :red_square:
  • :black_large_square:
0 voters

Nice guide, @RandomKid!

Thanks, @wingwave !

Np, it’s good to see you make Community Made Guides from Help .

Yeah, lol.

Nice guide! There is a way to concatenate the code at the end, but I don’t think that it’s needed. If you want to know, just ask. :]

I do want to point out you can also use:
image

But great guide! It’s nice to see you working out solutions to your own problems and sharing that knowledge with the community!

3 Likes

@blackhole927, where is the floor block? I can’t find it.

The round block has a dropdown for round down.

2 Likes

Oh, I could use that to make it much simpler. Also, thank you all for the compliments!

1 Like

How would I do that @ClicClac ?

I think what they were saying is that you can do set property seconds into game (rounded) /60. Something like that.

Oh… Thx for clarifying!

Nice Guide @RandomKid!

1 Like

Thank you!

Your Welcome.

1 Like

I just now realized that in the end-of-game widget there is an option for game time :frowning_face:

4 Likes

But this can also be used in an overlay! (to show game time)

2 Likes

True, it could.

1 Like