[Klonan] [2.1.14] Time allocation error of transition_time from player.set_controller()
Posted: Sat Aug 22, 2026 8:35 am
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:
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.
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
}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.