Closed nuggreat closed 5 years ago
I support this idea. There is precedent for such functionality in certain flight simulators in which it is possible to pause at top of descent, and such functionality has often been called for by communities where it is absent. In some cases, it has been combined with automatic adjustment of time acceleration, which is already possible in KOS. Adding the feature proposed here would seem consistent with existing principles.
However, I also propose an adjustment. The forced delay between pauses unnecessarily prevents various innovative uses of this technique, for example in repeated control transfer during partial automation of complex tasks. It is possible to provide a way out of repeated automated pauses by, for example, making some key combination or button available during an automatically-initiated pause that stops the program initiating the pause.
I am willing to provide clarification, justification, or further examples upon request.
Presumably some people wanting this would like to write a script like so:
If X is true, pause the game. Once Y is true, resume the game.
The first part is probably easy to implement. But that second part gets messier, because the simulated kOS computer pauses when the game pauses. (So that the second part of the script that says "once Y is true, resume the game" would never get executed while the game is paused.)
The fact that kOS pauses when the game pauses is part of its design to operate like the computer was a physical object inside the vessel. It stops for the same reason a bouncing ball stops when you pause the game. kOS only executes opcodes during Unity's FixedUpdate() hook, which is the thing Unity has you use if you want to get exactly 1 callback call per physical clock advancement.
I'm not saying it's impossible - just more work than it might appear on the surface because of that problem.
Again, if all you want is for the script to start a time freeze but be unable to end it without the human to do it, that could be done probably without too much effort.
All I want is the ability to start a time freeze I don't care about giving kOS the ability to unfreeze time.
And one way commands that are hard if not impossible to undo exist in the for of the launch x craft, the reverts to x, and the load save/quicksave stuff so I have no problem with this being something that suspends all kOS activity the same way as if you pressed escape your self and there being no way for kOS to resume play once paused
add a suffix to kuniverse to let a kOS core pause the game
For me this would be used in some of my longer range aircraft flights where the script can only fly to a location and not land in the field the pause is there for if I have stepped away from the computer and my craft gets to the target destination but then requires me landing so it can pause the game until I get back.
As added protection against things like user error it could be possible to make is so the call can only be called once every few seconds say 10 or so, game or IRL time doesn't matter to which as this is a forth wall breaking method and is intended let the user act if said call gets run to frequently by code