Page 1 of 1

[Klonan] [2.1.14] Time allocation error of transition_time from player.set_controller()

Posted: Sat Aug 22, 2026 8:35 am
by lotwaret
In version 2.1.14 of the game, create a world from tutorial level 04. Observed:
The camera stops at the center of the radar for a while and then slowly zooms out, ......
In version 1.1.110 of the game, create a world from tutorial level 04. Observed:
The camera stops at the center of the radar and then immediately zooms out slowly, ......
Search for the source code in scenario's control.lua and find it in the relevant section:

Code: Select all

player.set_controller
{
  type = defines.controllers.cutscene,
  waypoints =
  {
    {
      target = storage.radar,
      transition_time = 300,
      time_to_wait = 100,
      zoom = 2
    },
    {
      target = player.character,
      transition_time = 100,
      time_to_wait = 0,
      zoom = 1
    }
  },
  start_position = storage.radar.position,
  start_zoom = 4
}
The code from both versions only differs in the name changes of "global" and "storage", while the rest is the same.

By modifying the relevant values, it was found that the larger the 'transition_time', the longer the lens switching time, but at the same time, the longer the waiting time before switching. The time in this section should have been implemented for variables such as 'time_to_wait', but it was mistakenly affected by 'transition_time'.

Under normal circumstances, there should not be any extra waiting time before camera switching, as was the case in version 1.1.110.

Re: [2.1.14] Time allocation error of transition_time from player.set_controller()

Posted: Mon Aug 24, 2026 2:36 pm
by lotwaret
Further research found that:
The time originally used for lens conversion = the time used for lens conversion + the extra time spent before lens conversion
The latter's time is each half of the original time.
The time defined by "transition_time" is still equal to the time originally used for lens transition, rather than the actual time used for lens transition.