Vizzy is a visual programming system that you can use to automate your craft to execute a wide variety of flight-oriented tasks. The easiest way to get started is to watch the tutorial video here:
Programs
You can create a program for your craft by opening the menu and clicking EDIT PROGRAM. This will attach the program to your craft's primary command pod however, you can attach programs to any part in your craft. This can be done by clicking on a part and then opening the Tinker Panel and clicking the "Add Flight Program" button.
Instructions
Instructions have square corners and are connected in a sequence. They are executed one after another and many have slots where you can type in parameters or where you can drop expression blocks.
Expressions
Expressions return a value. Expressions with angled edges return a boolean (true or false) and expressions with curved corners return a string, number, vector, or list. An expression is only evaluated when it is inside the parameter slot of an instruction that is executing.
If an expression returns a value of a type that does not match the expected type of the parameter slot it is in, then the value will be automatically converted to the correct type. If Vizzy cannot figure out how to convert a value, it will use a default value. For example, if an expression returns a string and the parameter slot is expecting a number, then the string will be converted to a number. If the string cannot be converted to a number, then a default value of 0 will be used.
Events
Events are orange blocks that initiate execution at the appropriate time and are the starting point for a series of instructions. The most common event is the On Start event, which is where programs typically start.
Variables
Variables allow you to store a value that can be retrieved and processed later.
Custom Instructions and Expressions
You can create your own instructions and expressions in Vizzy. This is very similar to writing functions in other programming languages.
Program Execution
When a program starts, it checks to see if there are any On Start event blocks in the program and if there are it will create a new (artificial) thread to start executing the attached instructions, one at a time. Before executing an instruction, it will first evaluate all expression blocks inserted into the parameter slots of the instruction to determine the values to be used to execute the instruction.
If the craft encounters another event that has a corresponding event block in the program then it will create a new thread to execute the instructions attached to that event block. A program can have multiple threads running at once, however these threads are not true background threads and they all run on the game's main thread. To simulate simultaneous execution of threads, the game will alternate between threads each game frame. The program will execute at most 25 instructions per game frame. This number can be configured by XML-modifying the FlightProgram modifier's maxInstructionsPerFrame attribute. There is no limit to the number of expressions that can be evaluated in a single frame.
It is advised to place a Wait 0 Seconds at the end of loops as it is often a good place for a thread to pause execution for that game frame and give a chance to other threads in the program to execute.
Funk
The new FUNK expression was introduced in version 0.9.700. It parses and evaluates a text-based expression and returns the result as a number.
There are several properties that are accessible from the FUNK expression, but these are not yet finalized as version 0.9.700 is still in beta.
You can find more information about the FUNK expression here.
@seventeen it is a career mode not a SR2 copy