In construct 2: Choose("Funcion1", "Function2", "Function3")
In construct 3: ???
Develop games in your browser. Powerful, performant & highly capable.
Take a look at Function maps they allow you to select a function using a string.