P

Perry2192

Member

Last active 6 years ago

  1. 6 years ago
    Thu Jun 29 16:50:53 2017
    P Perry2192 started the conversation spawning module compositions mid mission.

    Hi guys,

    so i'm very new here and just started playing around with Alive as i really wanted to be able to have one faction begin later in the mission. For example there may be a task that needs completing before the player faction OPCOM begins.

    I had fiddled with the pause commands as posted on this forum without any success and so decided to take a new approach, which (to my great surprise) seems to have worked better than i possibly could have expected.

    Create your Opcom setup and sync to whatever you want (i had an opcom, mil placement with defined TAOR and logistics module) then save this as a composition in eden. When your desired insertion time has approached you can use the composition spawner by Larrow (https://forums.bistudio.com/forums/topic/191902-eden-composition-spawning/ ) to spawn the compostion. the OPCOM then creates the objectives and spawns soldiers mid way through the mission!

    if you have given your opcom a variable name you can then sync this to enemy modules you wish to attack using the synchronizeObjectsAdd command (https://community.bistudio.com/wiki/synchronizeObjectsAdd ).

    now i must point out i have only just tried this and got excited so thought i would post here if anyone is interested, but im sure there will be bugs to come with this method. Below is the code i had in my init to test this, blu_f opcom spawns 120 seconds after Alive initialises.

    hint "start";
    
    waitUntil {sleep 120;!isNil "ALIVE_profileSystemInit"};
    
    hint "go";
    
    _compReference = [ "aliveModules", getMarkerPos "marker_2", [ 0, 0, 0 ], 0, false, true ] call LARs_fnc_spawnComp;
    
    _myObjectInstance = missionNamespace getVariable ["spawnedOP" , objNull];
    _enemyObjectInstance = missionNamespace getVariable ["enemyOP" , objNull];
    
    _myObjectInstance synchronizeObjectsAdd [_enemyObjectInstance];
    
    
    hint "done";

    I am going to see if this will work with triggers.

  2. Wed Jun 28 22:16:13 2017
    P Perry2192 posted in Triggers, modules and scripting.

    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.

  3. Wed Jun 28 19:45:41 2017
    P Perry2192 posted in Triggers, modules and scripting.

    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.

  4. Tue Jun 27 18:54:23 2017
    P Perry2192 posted in Disable OPCOM.

    does this method still work?

    if so where do you define OPCOM_instances?

  5. Tue Jun 27 09:16:56 2017
    P Perry2192 started the conversation Triggers, modules and scripting.

    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.

  6. Tue Jun 27 09:09:12 2017
    P Perry2192 joined the forum.