Tiny Town

Time based events

The City Builder template comes with a time system implemented in C++. However, it can be easily controlled and used in blueprints. All the time related nodes reside in the TT_GameState class. The following shows the different nodes exposed to blueprints.

Time events

The time system relies on the variables shown on the right. These variable hold the data for the time of day and date of the year. For each variable, there is an event that will fire whenever the variable is updated. These events can be used to implement your own time based logic.

Time will by default start on the 1st of January of the year 0. This can be changed by modifying the corresponding variables shown on the right in blueprint. 

Time control

Beside changing the time, and date, the speed of time can also be controlled. The nodes shown on the right will enable the time to be paused, resumed, and sped up or slowed down.

The speed of time is governed by a time multiplier variable that can be modified via the SetTimeMultiplier node.  The default value of that multiplier is 1, any value above will speed up time, any value below will slow it down.

You should now be able to implement your own time based event in blueprints!

Last updated: March 2020
  • GitHub
  • Sketchfab
  • LinkedIn
  • Twitter