Triggers, modules and scripting

  1. 3 months ago

    Hi all,

    I have looked through these forums for answers but I'm afraid that solutions offered are either outdated or ineffective.

    I'm looking to have two opcom modules set up one for blufor and one for opfor where the blufor opcom is paused at the beggining of the mission and begins once a blufor sized trigger is activated.

    I have tried syncing triggers with objective modules and the opcom without success but I really don't want to pause the opfor opcom as well, that needs to continue.

    What is the best way to achieve this and do I need to do any scripting in the
    Mission folder?

    Thanks.

  2. i'm pulling my hair out here, must be something i'm missing. No matter what i try the BLU_F OPCOM still starts at the despite the trigger being deactivated.

    i really want to be able to have an blufor OPCOM deactivated when the mission starts which then activates once a manually placed groups reaches a location, is this even possible or am i deluded?

    thanks for your great work.

  3. Friznit

    Jun 28 Administrator

    You have to script it. Syncing a trigger to the module won't do anything. Details here: http://alivemod.com/wiki/index.php/Script_Snippets#Pausing_Modules

  4. Hi Friznit,

    Thanks for your reply, so what i have done since the OP is used Spyders script and placed this in my mission INIT:

    waitUntil {!isNil "ALIVE_profileSystemInit"};
    Spyder_fnc_disableOpcomByFaction = {
    	if (!isServer) exitWith {_this remoteExecCall ["Spyder_fnc_disableOpcomByFaction",2]};
    
    	private _faction = _this;
    
    	{
    		_opcom = _x;
    		private _opcomFactions = [_opcom,"factions"] call ALiVE_fnc_hashGet;
    
    		if (_faction in _opcomFactions) then {
    			[_opcom,"pause",true] call ALiVE_fnc_opcom;
    			
    		};
    	} forEach OPCOM_INSTANCES;
    };
    
    waitUntil {sleep 10;!isNil "ALIVE_profileSystemInit"};
    "BLU_F" call Spyder_fnc_disableOpcomByFaction;

    I have also tried to use:

    ["ALIVE_SYS_PROFILE","ALIVE_MIL_OPCOM","ALIVE_AMB_CIV_POPULATION","ALIVE_MIL_LOGISTICS","ALIVE_SYS_AISKILL"] call ALiVE_fnc_pauseModule;

    neither seem to have any effect, the OPCOM still spawns and attacks the objectives. Also if i use the "ALiVE_fnc_pauseModule" command above i get an error that _mainclass is undefined.

    I'm not sure where i'm going wrong, i'm sure that pausing the modules at the beginning of the mission must be possible.

    one final question: when the OPCOM is paused does it stop activity instantly or continue to process commands and spawns for a time? i think part of my issue may be that i call the functions immediately after Alive initialises.

 

or Sign Up to reply!