1 decade ago by Husten
hi,
i have a problem with the timing of the start of the game. the game needs some global vars based on lot of other stuff. so i used this sortiing
1. include the impactfiles
2. do the other stuff to get the perfect globals vars
3. start the game with ig.main
but sometime step 2 is faster than loading of step 1, so i get an error, cause ig.game is not there. when i place the start of the game in the main.js (so after step 1) it can happen, that step 1 is faster than step 2 and the game starts without the correct global vars.
any ideas? i need to start the game after step 1 and 2 are completed.
i have a problem with the timing of the start of the game. the game needs some global vars based on lot of other stuff. so i used this sortiing
1. include the impactfiles
2. do the other stuff to get the perfect globals vars
3. start the game with ig.main
but sometime step 2 is faster than loading of step 1, so i get an error, cause ig.game is not there. when i place the start of the game in the main.js (so after step 1) it can happen, that step 1 is faster than step 2 and the game starts without the correct global vars.
any ideas? i need to start the game after step 1 and 2 are completed.