I am sure this is blindingly obvious but… How does one call a function from a second function?
If ‘nested’ within the current function it is fine - e.g.
functionmain() {
//do something;
functionsub() // call secondary function;
function functionsub() {
//do something else to call above;
}
}
How though does to run functionsub() when it is within a main function run on scene load?
The answer must be similar to the difference in scope between var myvariable (local) and window.myvariable (global), but I can’t find it in the documentation.