L

Ledere

Member

Last active 3 weeks ago

  1. 3 weeks ago
    Thu Oct 25 02:21:38 2018

    After taking a break, I realized I was approaching this from entirely the wrong angle. Instead of waiting for the module to initialize, I just need to wait for the variable I need to have data.

    In case anyone needs to do a similar thing, this is what I solved it with:

    private "_forcePool";
    _faction = "BLU_F";
    waitUntil {
    	sleep 0.5;
    	_forcePool = [ALIVE_globalForcePool, _faction] call ALIVE_fnc_hashGet;
    	!isNil "_forcePool";
    };

    Either way, thanks for the help @SpyderBlack723

  2. Wed Oct 24 17:01:27 2018
    L Ledere started the conversation Wait for ALIVE_globalForcePool to be fully initialized.

    I'm trying to pull data from the globalForcePool, however I haven't found a way to wait for it finish grabbing data in a more robust way. I'm currently just sleeping for 30 seconds after mission start, which works, but I have no guarantee that this will work all the time.

    I've tried waiting for waitUntil {!isNil "ALIVE_mil_OPCOM"}, but this happens before the globalForcePool is initalized.
    Doing the same for ALIVE_mil_logistics never continues.
    Doing the same for ALIVE_globalForcePool returns an empty array.

    Looking into the code, it seems that the Military Logistics module has its own variables for startupComplete and initialAnalysisComplete, which looks like what I need, but I can't find a way to access those variables directly.

    Any help would be appreciated.

  3. Wed Oct 24 16:37:54 2018
    L Ledere joined the forum.