Category | Scripting |
Created | 10.11.2014 03:55 |
Julien Rüggeberg (Unknown) | 10.11.2014 04:00 |
---|---|
Hi Guys, I am looking for how to register an initialize event that is called when the map has finished loading. In a mod I am just writing some tasks need to be done when all other vars are loaded into memory. I helped myself out with using an 'isInitialized'-bool, checking that in the update function and thereby calling my init-function once as soon as the game starts rendering the map. This works fine, unfortunately, if I leave the map to the main menu and then load the map again, the isInitialized-Var does not seem to be set back to false again. Is there a callback funtion that is called exactly once per level load, but for sure every time the level is loaded? Thanx, Dschonny |
Sebastian Lampe (Unknown) | 10.11.2014 20:18 |
---|---|
Hi Julien, you could try using "g_currentMission.isLoadingMap" which is a bool and when I tried it, it returned "false" as I entered the game. I don't know exactly what it does but the name of the variable sounds promising :) Best Sebastian |
Note: Log in to post. Create a new account here.