Alive and Scripting

  1. 7 years ago

    So i have some questions, if anyone can help.

    i found some stuff on the wiki, and i tried looking trough the functions on the Github.

    i can see that you can add objectives to OPCOM. but can i remove objectives from opcom ?
    also i can see that you can Profile new units to AI Profiler, but can i remove virtualised profiles ?

    is there somewhere i can have a look at more alive functions from a scripting perspective ? (ithout roaming trough the functions on github)

  2. Edited 7 years ago by SpyderBlack723

    You'll have to roam through the functions (and wiki). There hasn't really been a big enough (publicly displayed) interest for in-depth documentation so it tends to get overlooked.

  3. :( well well will give it a go, thanks

  4. Okey, ill use this threads to post some stuff..

    found this function to add objectives to opcom

    //Example:[["ID_Name", Position, Obective size,"MIL",300],["EAST"]] call cjb_addObjectiveToSides;
    
    cjb_addObjectiveToSides = 
    {
    	private["_objectiveParams","_factions","_faction","_opcom","_opcomSide"];
    	_objectiveParams = _this select 0;
    	_factions = _this select 1;
    	{
    		_opcom = _x;
    		{
    			_faction = _x;
    			_opcomSide = [_opcom,"side",""] call ALiVE_fnc_HashGet;
     
    			if( _opcomSide == _faction) then {
    				[_opcom, "addObjective", _objectiveParams] call ALiVE_fnc_OPCOM;
    			};
    		} forEach _factions;
    	} forEach OPCOM_INSTANCES;
    };

    and i figuered this would work in similar fasion (iam not at home so its untestedcode)

    //Example:["ID_Name","SIDE"] call cjb_addObjectiveToSides;
    
    cjb_RemoveObjectiveToSides = 
    {
    	private["_factions","_faction","_opcom","_opcomSide"];
    	_id = _this select 0;
    	_factions = _this select 1;
    	{
    		_opcom = _x;
    		{
    			_faction = _x;
    			_opcomSide = [_opcom,"side",""] call ALiVE_fnc_HashGet;
     
    			if( _opcomSide == _faction) then {
    				[_opcom, "removeObjective", _id] call ALiVE_fnc_OPCOM;
    			};
    		} forEach _factions;
    	} forEach OPCOM_INSTANCES;
    };
  5. @SpyderBlack723 You'll have to roam through the functions (and wiki). There hasn't really been a big enough (publicly displayed) interest for in-depth documentation so it tends to get overlooked.

    This is a good idea and would greatly enhance the mission makers options when using ALiVE. I can help with suggestions ;)

  6. GunnyDev

    24 Jan 2017 Administrator

    ALiVE_fnc_Nuke;

 

or Sign Up to reply!