Here is quote from manual:
Local variables
Local variables are variables placed nested under other events, or inside a group. They also show with a different icon to global variables.
A local variable
The main difference between global and local variables is local variables can only be accessed in their scope. A local variable's scope is its level of sub-events. All other events at the same level of indentation, or lower levels, can access the local variable. Events above it (less indented) cannot access the local variable.
For example, if an event variable is in a group of events, it becomes a local variable. Then, it will only appear as an option for a variable in events inside that group. In other groups or in other event sheets it does not appear at all and cannot be accessed. This makes the variable local to the scope in which it is placed.
Local variables convenient for temporarily holding variables over a short range of events, such as to calculate an average value (where a temporary sum variable may be necessary). It also helps keep the project simple, since it prevents the need to create more global variables, which appear everywhere in the project even if they are not needed everywhere.
The scope of local variables is designed to mimic how the scope of variables works in real programming languages.
------------------------------------------------------------------------------
Found in manual, page 115:
Static
Only applies to local variables. By default, local variables reset their value to the
initial value every tick. However if Static is checked, the local variable's value will
persist permanently, like a global variable. Static local variables differ from global
variables in that they can still only be used within their scope. Global variables
always hold their values permanently so the Static option does not apply to them.
For more information about local variables, see Event Variables.