$sv(var, value, [index])

Would like to have the ability (function) to set the value of a global variable, something like $sv(var, value, [index])$.

Can be useful in touch and animation events and in all kind of formulas.

This is not possible due to technical reasons, you can still set a global in a touch animations using the "switch global" option and selecting a text global (this will allow you to set a text global to any value on touch). Also from 3.22 it will be possible to set a global using an Android shortcut that can be launched from external apps. In the future i might also add a limited set of "events" that will also trigger this, but setting it in "kode" will never be possible.