Jump to content

bleeyds

Member
  • Posts

    8
  • Joined

  • Last visited

Posts posted by bleeyds

  1. Like 1Man said, they start pretty much immediately. If the RPT isn't saying anything, that could be a clue to the mod not starting at all.

     

    I also run SEM, StatusBar and a Tow/Lift script, below is my mission.pbo (epoch.Altis.pbo) init.sqf if it helps;

     

     

    //Tow and Lift

    [] execVM "R3F_LOG\init.sqf";

    // Pix - Status Bar

    [] execVM "scripts\fn_statusBar.sqf";

    //blckeagls' - AI Mission - Version 2.0.2

    //If server execute this script

    if (isServer) then {

        execVM "\q\addons\custom_server\init.sqf";

    //If anything but server execute this script

    } else {

        [] spawn {

            //This is to spawn the markers when players enter after server has started

            [] execVM "debug\addmarkers.sqf";

            [] execVM "debug\addmarkers2.sqf";

            [] execVM "debug\addmarkers75.sqf";

            [] execVM "debug\addmarkers752.sqf";

            //Event handler to show messages to players // this can be used for other scripts to send messages to players -- see AIM.sqf

            "blck_Message" addPublicVariableEventHandler {titleText[format["%1",_this select 1],"PLAIN DOWN",1];};

        };

    };

    // KiloSwiss - Simple Epoch Missions v0.6

    if(isDedicated)exitWith{}; //Everything below this line is only executed on the client (player or local host)

    //Wait until these variables are broadcasted to the client (usually happens before the init gets executed)

    waitUntil{!isNil {SEM_removeWeaponsFromDeadAI}};

    waitUntil{!isNil {SEM_removeMagazinesFromDeadAI}};

    //diag_log format["#SEM DEBUG: variables received: Weapons %1 - Magazines %2", SEM_removeWeaponsFromDeadAI, SEM_removeMagazinesFromDeadAI];

    fn_createMissionMarker = {    private["_create","_markerPos","_markerName","_marker"];

        _create = _this select 0;

        

        if(!_create)then[{    //delete marker

            if (getMarkerColor "MissionMarker" != "")then{    //Only delete existing Marker

                deleteMarkerLocal "MissionMarker";

            };

        },{    //else create marker

        _markerPos = _this select 1;

        _markerName = _this select 2;

        

        _marker = createMarkerLocal ["MissionMarker", _markerPos];

        _marker setMarkerPosLocal _markerPos;

        _marker setMarkerTypeLocal "hd_destroy";  

        _marker setMarkerTextLocal format["%1",_markerName];  

        _marker setMarkerColorLocal "ColorRed";

        _marker setMarkerDirLocal -37;

        _marker setMarkerSizeLocal [0.8,0.8];

        }];

    };

    fn_AIaddKilledEH = {

        if(isPlayer _this || !local _this)exitWith{systemChat "NEIN!"};

        call compile format["

            _this addEventHandler ['Fired',{

                if(_this select 2 in %1)then{

                    _this select 0 addMagazines [_this select 5, 1];

                };

            }];

            _this addEventHandler ['Killed',{ private ['_unit','_z'];

                _unit = _this select 0;

                removeBackpackGlobal _unit;

                {_unit removeWeaponGlobal _x}count (%1 + ['EpochRadio0','ItemMap','ItemRadio','ItemWatch','ItemCompass','ItemGPS']);

                {if(_x in (magazines _unit))then{_unit removeMagazines _x}}count %2;

                

                _unit spawn{

                    sleep 1;

                    {

                    _z = _x;

                    if(_x in (getweaponcargo _z))then{deleteVehicle _z}count %1;

                    if(_x in (getmagazinecargo _z))then{deleteVehicle _z}count %2;

                    }forEach nearestObjects [(getPos _this), ['GroundWeaponHolder','WeaponHolderSimulated','WeaponHolder'], 12];

                };

            }];

        ", SEM_removeWeaponsFromDeadAI, SEM_removeMagazinesFromDeadAI];

    };

     /* DO NOT CALL "fn_animateAI" because the sleep commands will cause errors when used in a non-scheduled environment */

    fn_animateAI = {    private["_group","_pos","_checkPos","_firstLoop","_nearPlayers","_doMove","_dir","_dist","_posX","_posY","_oldPos","_newPos","_z"];

        _group = _this select 0;

        _pos = _this select 1;

        _checkPos = _pos; _checkPos set [2,2];

        

        waitUntil{{owner _x == owner player}forEach units _group};    //Wait until the server gives You the ownership of the AI

        diag_log format["#SEM: Client taking over AI ownership at Pos %1, Distance %2", _pos, (vehicle player) distance _pos];

        {

        _x call fn_AIaddKilledEH;

        _x enableAI "AUTOTARGET";

        //_x enableAI "TARGET";

        _x enableAI "MOVE";

        _x enableAI "ANIM";

        _x enableAI "FSM";

        _x stop false;

        _x setUnitPos "Auto";

        }count units _group;

        _group setCombatMode "YELLOW";

        _group setBehaviour "COMBAT"; //"AWARE";

        //waitUntil{{alive _x}count units _group < 1 || ({owner _x != owner player}forEach units _group)};

        

        while{{alive _x}count units _group > 0 && ({owner _x == owner player}forEach units _group)}do{

            _nearPlayers = _pos nearEntities [["Epoch_Man_base_F","Epoch_Female_base_F","Helicopter","Car","Motorcycle"], 1200];    //"Epoch_Man_base_F","Epoch_Female_base_F"

            {if(alive _x && isPlayer _x)then{    if(!(terrainIntersect [_checkPos, [(getPosATL _x) select 0, (getPosATL _x) select 1, ((getPosATL _x) select 2) + 1]]))then{

                _z = _x; _group reveal _z;

                {if((secondaryWeapon _x) == "")then{

                    _x doWatch _z; _x doTarget _z;

                    _x commandFire _z; _x suppressFor 10;

                }}count units _group;

                UIsleep (10+(random 10));

            }}}forEach _nearPlayers;

        UIsleep 3;

        };

        

        diag_log format["#SEM: AI ownership lost - Remaining AIs: %1", count units _group];

    };

    "GlobalHint" addPublicVariableEventHandler { private "_sound";

        _sound = (_this select 1) select 0;

        switch(_sound)do{

            case 0:{playSound "UAV_05"}; //Mission start

            case 1:{playSound "UAV_01"}; //Mission fail (object destroyed)

            case 2:{playSound "UAV_04"}; //Mission fail (time out)

            case 3:{playsound "UAV_03"}; //Mission success

        };

        hint parseText format["%1", (_this select 1) select 1]

    };

    if(!isNil "GlobalMissionMarker")then{GlobalMissionMarker call fn_createMissionMarker};

    "GlobalMissionMarker" addPublicVariableEventHandler {_this select 1 call fn_createMissionMarker};

    if(!isNil "takeAIownership")then{takeAIownership call fn_animateAI};

    "takeAIownership" addPublicVariableEventHandler {_this select 1 spawn fn_animateAI}; //DO NOT CALL!

    if(toLower worldName in ["chernarus","chernarus_summer"])then{

        ([4654.62,9593.63,0] nearestObject 145259) setDamage 1;

        ([4654.62,9593.63,0] nearestObject 145260) setDamage 1;

    };    //Fix for something, find out ;)

     

    I've added a few //comments to help you identify which parts are which.

     

    Thanks! It finally clicked, I had to repackage the .pbo file with blckeagls' files. Totally new to this, so I am sure that is apparent to everyone else, ha!

     

    Appreciate the help, everything is working now. 

  2. I'm doing the same thing, (Start Redis.exe, Arma3server.exe & then Arma3.exe) everything in this package works as advertised (other than the RPT spamming I mentioned earlier, still happening with v2.0.2)

     

    I am not even seeing anything in the RPT files, so odd. That is the same process I use to start. How long after server start is it before you see the missions show up?

     

    No doubt I have something configured incorrectly. I'll keep tinkering. 

  3. 5 Minutes... but you have to add the custom_server.pbo to your @EpochHive/Addons (server folder) folder

     

    Yep, I just checked again, 'custom_server.pbo' is in the @epochhive/addons folder.

     

    I don't think it matters, but I am just running this on my desktop pc, so client and server on same computer. Epoch server works fine, I can enter Altis, see loot spawns, traders, etc. 

  4. I must be missing something because I cannot get any AI missions to spawn. I have followed the directions in the original post. I am unclear about step 6 since the most recent download doesn't have a 'mission.zip' file. 

     

    My 'mpmissions' directory looks like this:

    • Altis.Epoch folder
      • debug folder
      • init.sqf
    • epoch.Altus.pbo
    • epoch.Chernarus.pbo
    • epoch.Stratis.pbo

    I did not edit any pbos and this is vanilla epoch .2.5.2

     

    Epoch runs fine, I am not seeing any type of error, just no AI mission spawning. How often/soon does the AI missions spawn after a server restart?

×
×
  • Create New...