Jump to content
Porkeld

A3_vemf_Re_reloaded

Recommended Posts

A3_vemf_Re_reloaded

 

Vemf_reloaded was originally made by IT07 and last commit on vemf_reloaded was in 2017....
I really like this mission script, but in my opinion it was missing some essential features compared to other mission systems.

So I decided to add and fix some of the stuff for vemf.

Check the Changelog for fixes and new stuff.


 

Spoiler

v0.669

 

Added : enable/disable mines for each faction.

 

v0.668

 

 

Fixed : FaceWear was not being loaded.

Added : "missionrange" to config // how many meters away from player before mission will initialize.

Added : Separated heli and vehicle chance for each invasion class.

Disabled max vehicles for now.

 

v0.667

 

Fixed : Error in rpt. removeAllEventHandlers 'MPKilled' } >

Fixed : bugs regarding tws blacklist

Fixed : Baseattack ai can also spawn mortars.

 

v0.666


Fixed :     Apex classes was not working. Added new check for apex and added "ApexEnabled =" in settings.
            Now all 4 factions will spawn.
            
Fixed :     AI spawned without scopes on rifles. code for attacthment has been reworked.

Fixed :     Weapons in lootcrates now spawns with correct ammo.

Fixed :     Not all lightsources in cities was turned off when "disable street lights = yes"   Now invaded cities are completely black.

Fixed :     Special forces had a grey color marker wich could be difficult to see if spawned on a spawn point.
            Made it pink! 😉

Fixed :     Cleaned up config and sorted some settings.

Added :        Possibility of spawning a vehicle patrol.

Added :        Vehicle patrol in invaded areas and spawn chance for both heli and vehicle in percentage.

Added :        Lights and new lightsource to heli patrol during night. Heli will now light up the ground below. If using a hellccat Ai will now use searchlight to track player.

added :     Added some locations to blacklist that did not make sense.

Added :     Mortars and chance in percentage for AI to be equipped with mortars - THIS is exciting.. AI will setup a mortar and bombard the player..... 

Added :        Class for AI loadout percentage in cfg :
            
            class aiLoadoutChance  // AI loadout chance
                        
                            ai_nighttime_accessory_chance =  // AI will (if equipped with a flashlight) light you up during nighttime.
                            ai_scope_chance = 100;
                            ai_muzzle_chance = 100;  //Select random muzzle
                            ai_bipod_chance = 100;     // Select random pointer
                            ai_pointer_chance = 100; // Select random bipod
                            ai_nighttime_NVGoggles_chance = 0;    // Percentage chance that AI will have a NVGoggles spawned during nighttime


Added :        inventory loadout array for AI. Vemf AI´s had no loot in their inventory.

                            Items[] = { "Exile_Item_DuctTape", "Exile_Item_CanOpener", "Exile_Item_MobilePhone", "Exile_Item_Knife" }; 

                            explosives[] = { "MiniGrenade", "MiniGrenade", "HandGrenade", "HandGrenade", "APERSBoundingMine_Range_Mag", "APERSMine_Range_Mag" };

                            medkits[] = { "Exile_item_Bandage", "Exile_Item_InstaDoc", "Exile_Item_Vishpirin", "Exile_Item_Vishpirin", "FirstAidKit", "FirstAidKit" };

                            food[] = { "Exile_Item_Moobar", "Exile_Item_BeefParts", "Exile_Item_EMRE", "Exile_Item_PlasticBottleFreshWater", "Exile_Item_Energydrink", "Exile_Item_SausageGravy", "Exile_Item_Surstromming", 
                                        "Exile_Item_PlasticBottleCoffee", "Exile_Item_MountainDupe", "Exile_Item_Noodles", "Exile_Item_MacasCheese", "Exile_Item_MacasCheese_Cooked", "Exile_Item_CockONut" };  
                                                    
                            binoc[] = { "Rangefinder", "Binocular" };

Added :     added option to configure scope and attachments (muzzle + bipods) slots in config.    

                            scopSlotsMax = 20; // Maximum number of scope slots in each loot crate
                            scopSlotsMin = 10; // Minimum number of scope slots in each loot crate
            
added :        seperated array for muzzles and bipods in crateloot.           

 

 

 

 

All credit goes to IT07 for coding this and also a big THANK YOU to Ghostrider [GRG] for helping and always being helpfull when needed 🙂

 

Check readme and how to install.txt

 

Download https://github.com/Porkeld/A3_vemf_re-reloaded

 

If you have any questions/bug reports or ideas for vemf_re_reloaded then find me on discord Porkeld#1506 

Edited by Porkeld
  • Like 2
  • Thanks 3

Share this post


Link to post
Share on other sites

@Porkeld - Well, what I can say is that it works.  No errors or anything 'funky'.  So, from that point, I can only assume that everything else is working too!

 

Thanks again!

 

🙂

 

Share this post


Link to post
Share on other sites

v0.668        

Fixed:             FaceWear was not being loaded for some classes.

Added :         "missionrange" to config // how many meters away from player before mission will initialize.

Added :        Separated heli and vehicle chance for each invasion class.
                      Disabled max vehicles for now.

Share this post


Link to post
Share on other sites

v0.669

 

Added :   enable/disable mines for all factions.

Share this post


Link to post
Share on other sites

I know it's been a few months since the last post, but after installing, I have group spawns, but they stand in one place, will engage players, but will not move or even turn around. They stand completely still. Has anyone else experienced this?

 

Share this post


Link to post
Share on other sites

Does anyone have any idea on how I can make this dynamic location invasion occur in a specific location? Here is the original code:

 

Spoiler

/*
    DynamicLocationInvasion by IT07
*/

VEMFrMissionCount = VEMFrMissionCount + 1;
if ( isNil "VEMFrInvasionCount" ) then { VEMFrInvasionCount = 0; };
VEMFrInvasionCount = VEMFrInvasionCount + 1;
_this0 = _this select 0;
if ( VEMFrInvasionCount <= ( ( [ [ "missionSettings", _this0 ], [ "maxInvasions" ] ] call VEMFr_fnc_config ) select 0 ) ) then
{
    scopeName "outer";
    _mod = call VEMFr_fnc_whichMod;

    // Define the settings
    ( [
        [ "missionSettings", _this0 ],
        [ "groupCount", "groupUnits", "maxDistancePrefered", "skipDistance", "useMarker", "markCrateVisual", "markCrateOnMap", "announce", "streetLightsEnabled", "streetLightsRestore", "streetLightsRange", "allowCrateLift", "allowRepeat", "randomModes", "spawnCrateFirst", "flairTypes", "smokeTypes", "skipDistanceReversed", "ApexEnabled", "missionrange" ]
    ] call VEMFr_fnc_config ) params [ "_ms0", "_ms1", "_ms2", "_ms3", "_ms4", "_ms5", "_ms6", "_ms7", "_ms8", "_ms9", "_ms10", "_ms11", "_ms12", "_ms13", "_ms14", "_ms15", "_ms16", "_ms17", "_Apex", "_msra" ];
    //diag_log format ["vemf_Debug: %1",_msra];
    ( [ [ "missionSettings", _this0, "crateParachute" ], [ "enabled", "altitude" ] ] call VEMFr_fnc_config ) params [ "_cp0", "_cp1" ];

    ( [ [ "missionSettings", _this0, "mines" ], [ "cleanup", "guerMine", "polrMine", "polsMine", "gendMine", "banditMine"  ] ] call VEMFr_fnc_config ) params [ "_ms19", "_guerM", "_polrM", "_polsM", "_gendM", "_banditM"  ];

    _l = [ "loc", false, position ( selectRandom allPlayers ), if ( _ms17 > 0 ) then { _ms17 } else { _ms3 }, _ms2, if ( _ms17 > 0 ) then { _ms17 } else { _ms3 }, _this0 ] call VEMFr_fnc_findPos;
    if not ( isNil "_l" ) then
    {
        _ln = text _l;
        _lp = position _l;
        if ( _ln isEqualTo "" ) then { _ln = "Area" };
        [ _this0, 1, format [ "invading %1...", _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
        
        _m = ( [ [ _mod ], [ "aiMode" ] ] call VEMFr_fnc_config ) select 0;
        if ( _ms13 isEqualTo "yes" ) then { _m = [ 0, 1, 2 ]; if ( ( "ApexEnabled" call VEMFr_fnc_config ) isEqualTo "yes" ) then { _m pushBack 3; _m pushBack 4 }; _m = selectRandom _m };
        //diag_log format ["vemf Debug: missions %1 ",_m];
        if ( _ms7 isEqualTo "yes" ) then
            {
                if ( _m isEqualTo 0 ) then { [ "ColorEAST", "NEW MISSION", format [ "%1 Armed Guerillas have invaded %2 @ %3", worldName, _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                if ( _m isEqualTo 1 ) then { [ "ColorWEST", "NEW MISSION", format [ "%1 Corrupt Police forces are now controlling %2 @ %3", worldName, _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                if ( _m isEqualTo 2 ) then { [ "ColorPink", "NEW MISSION", format [ "%1 Special Forces are now raiding %2 @ %3", worldName, _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                if ( _m isEqualTo 3 ) then { [ "ColorBrown", "NEW MISSION", format [ "The Gendarmerie has invaded %1 @ %2", _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                if ( _m isEqualTo 4 ) then { [ "ColorYellow", "NEW MISSION", format [ "%1 bandits have taken %2 @ %3", worldName, _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                //diag_log format ["vemf Debug: %1",_m];
            };

        private "_mrkr";
        if ( _ms4 isEqualTo "yes" ) then
        { // Create/place the marker if enabled
            _mrkr = createMarker [ format [ "VEMFrMarker%1", _ln ], _lp ];
            _mrkr setMarkerShape "ICON";
            _mrkr setMarkerType "o_art";
            _mrkr setMarkerSize [ 0.1, 0.1 ];

            if ( _m isEqualTo 0 ) then { _mrkr setMarkerColor "ColorEAST" };
            if ( _m isEqualTo 1 ) then { _mrkr setMarkerColor "ColorWEST" };
            if ( _m isEqualTo 2 ) then { _mrkr setMarkerColor "ColorPink" };
            if ( _m isEqualTo 3 ) then { _mrkr setMarkerColor "ColorBrown" };
            if ( _m isEqualTo 4 ) then { _mrkr setMarkerColor "ColorYellow" };
            
        };

        // If enabled, kill all the lights
        if ( _ms8 isEqualTo "no" ) then
        {
            {
                if ( ( damage _x ) < 0.95 ) then
                {
                    _x setDamage 0.95;
                    uiSleep 0.1;
                };
            } forEach ( nearestObjects [ _lp, [ "Lamps_Base_F", "PowerLines_base_F", "Land_PowerPoleWooden_L_F", "Land_LampDecor_F", "Land_LampShabby_F", "Land_LampStreet_small_F", "Land_LampStreet_F", "Land_LampSolar_F", "Land_LampAirport_F", "land_LampHalogen_F", "Land_LampHarbour_F", "Land_LampStadium_F", "Land_PowerLine_01_pole_small_F", "Land_fs_roof_F" ], _ms10 ] );
            // tanoa  Land_PowerLine_01_pole_lamp_F    
        };

        private "_crate";
        _dSpwnCrt =
        {
            // Choose a box
            _bx = selectRandom ( ( [ [ "missionSettings", _this0], [ "crateTypes" ] ] call VEMFr_fnc_config ) select 0 );
            _ps = [ _lp, 0, 200, 0, 0, 300, 0 ] call bis_fnc_findSafePos;
            if ( _cp0 isEqualTo "yes" ) then
            {
                _cht = createVehicle [ "I_Parachute_02_F", _ps, [], 0, "FLY" ];
                if ( _mod isEqualTo "Epoch" ) then { _cht call EPOCH_server_setVToken };
                _cht setPos [ ( getPos _cht ) select 0, ( getPos _cht ) select 1, _cp1 ];
                _cht enableSimulationGlobal true;

                if not ( isNull _cht ) then
                {
                    _crate = createVehicle [ _bx, getPos _cht, [], 0, "NONE" ];
                    _crate allowDamage false;
                    _crate enableSimulationGlobal true;
                    _crate attachTo [ _cht, [ 0, 0, 0 ] ];
                    [ _this0, 1, format [ "crate parachuted at: %1 / Grid: %2", ( getPosATL _crate ), mapGridPosition ( getPosATL _crate ) ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                    [ _crate, _ln, _lp ] ExecVM ( "loadLoot" call VEMFr_fnc_scriptPath );
                    waitUntil { if ( ( ( getPos _crate ) select 2 ) < 7 ) then { true } else { uiSleep 1; false } };
                    detach _crate;
                } else { [ _this0, 0, "where is the chute??" ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
            } else
            {
                _crate = createVehicle [ _bx, _ps, [], 0, "NONE" ];
                _crate allowDamage false;
                [ _crate, _ln, _lp ] ExecVM ( "loadLoot" call VEMFr_fnc_scriptPath );
            };

            if ( _ms11 > 0 ) then { _crate enableRopeAttach false } else { _crate enableRopeAttach true };
        };

        if ( [ _lp, _msra ] call VEMFr_fnc_waitForPlayers ) then
        {
            _spwnd = [ _lp, _m, _this0, 200 ] call VEMFr_fnc_spawnInvasionAI;
            _nts = [ ];
            {
                [ _x ] ExecVM ( "signAI" call VEMFr_fnc_scriptPath );
                {
                    _nts pushBack _x;
                } forEach ( units _x );
            } forEach ( _spwnd select 0 );

            _cl50s = _spwnd select 1;
            ///////     heli   patrol   ////
            ( [ [ "missionSettings", _this0, "heliPatrol" ], [ "classesVanilla", "classesHeliDLC", "classesApex", "locked", "guerChance", "polrChance", "polsChance", "gendChance", "banditChance" ] ] call VEMFr_fnc_config ) params [ "_hp1", "_hp2", "_hp3", "_hp4", "_guerCh", "_polrCh", "_polsCh", "_gendCh", "_bandCh" ];
            //if ( ( (random 100) <= _hp0) ) then
            if ( ( _m isEqualTo 0 ) AND ( ( random 100) <= _guerCh ) OR ( _m isEqualTo 1 ) AND ( ( random 100) <= _polrCh ) OR ( _m isEqualTo 2 ) AND ( ( random 100) <= _polsCh ) OR ( _m isEqualTo 3 ) AND ( ( random 100) <= _gendCh ) OR ( _m isEqualTo 4 ) AND ( (random 100) <= _bandCh ) ) then
                {
                    [ _this0, 1, format [ "adding a heli patrol to the invasion of %1 at %2", _ln, mapGridPosition _lp ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                    _classes = _hp1;
                    //if ( ( "Heli" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then { _classes append _hp2 };
                    if ( ( "ApexEnabled" call VEMFr_fnc_config ) isEqualTo "yes" ) then { _classes append _hp3 };
                    _heli = createVehicle [ selectRandom _classes, _lp, [], 5, "FLY" ];
                    if ( _mod isEqualTo "Epoch" ) then { _heli call EPOCH_server_setVToken };
                    _heli setPosATL [ ( getPos _heli ) select 0, ( getPos _heli ) select 1, 13 ];
                    _heli flyInHeight 10;

                    /////
                    if ( _hp4 isEqualTo "yes" ) then { _heli lock true };

                    _trrts = allTurrets [ _heli, true ];

                    _hlGrp = ( [ _lp, 1, ( ( count _trrts ) + ( _heli emptyPositions "commander" ) + 1 ), _m, _this0 ] call VEMFr_fnc_spawnVEMFrAI ) select 0;
                    {
                        if ( ( ( _heli emptyPositions "driver" ) isEqualTo 1 ) AND ( _x isEqualTo ( leader ( group _x ) ) ) ) then { _x moveInDriver _heli }
                            else
                                {
                                    private "_path";
                                    {
                                        if ( isNull ( _heli turretUnit _x ) ) then { _path = _x };
                                    } forEach _trrts;
                                    
                                    if not ( isNil "_path" ) then { _x moveInTurret [ _heli, _path ] }
                                        else
                                            {
                                                if ( ( _heli emptyPositions "commander" ) > 0 ) then { _x moveInCommander _heli };
                                            };
                                };

                        if not ( ( backPack _x ) isEqualTo "" ) then { removeBackpack _x };
                        _x addBackpack "B_Parachute";
                        _x disableAI "LIGHTS";
                        _nts pushBack _x;
                    } forEach ( units _hlGrp );
                    _nighttime = (sunOrMoon != 1);
                    if _nighttime then{ 
                            _heli disableAI "LIGHTS";
                            _heli turretUnit [0] action ["SearchLightOn", _heli];
                            _heli setPilotLight true;    
                            _heli setCollisionLight true; 
                            /////  Lightpoint for heli
                            _light = "#lightpoint" createVehicle position _heli;
                            [_light,1.9] remoteExec ["setLightBrightness",0,_light];
                            [_light,[2.3, 2.3, 2.55]] remoteExec ["setLightAmbient",0,_light];
                            [_light,[230, 230, 255]] remoteExec ["setLightColor",0,_light];
                            [_light,500] remoteExec ["setLightIntensity",0,_light];
                            [_light,true] remoteExec ["setLightUseFlare",0,_light];
                            [_light,(getpos _heli select 2)] remoteExec ["setLightFlareSize",0,_light];
                            [_light,[_heli, [0,30,- (getpos _heli select 2)] ]] remoteExec ["lightAttachObject",0,_light];
                            
                        };
                    ///  lights  //
                    _wp = _hlGrp addWaypoint [ [ _lp select 0, _lp select 1, 30 ], 1, 1 ];
                    _wp setWaypointBehaviour "AWARE";
                    _wp setWaypointCombatMode "RED";
                    _wp setWaypointSpeed "LIMITED";
                    _wp setWaypointType "SAD";
                    //_wp setWaypointLoiterType "CIRCLE";
                    //_wp setWaypointLoiterRadius 200;
                    _hlGrp setCurrentWaypoint _wp;
                    //[ _hlGrp ] ExecVM ( "signAI" call VEMFr_fnc_scriptPath );
                };
            ///////     Vehicle   patrol   //////////
            ( [ [ "missionSettings", _this0, "vehiclePatrol" ], [ "classesVanilla", "classesHeliDLC", "classesApex", "locked", "maxVehicles", "guerChance", "polrChance", "polsChance", "gendChance", "banditChance" ] ] call VEMFr_fnc_config ) params [ "_hp1", "_hp2", "_hp3", "_hp4", "_mV", "_guerCh", "_polrCh", "_polsCh", "_gendCh", "_bandCh" ];

            //if (random 100 <= _vc) then { for "_i" from 1 to ( 1 max random (_mv) ) } do    
            if ( ( _m isEqualTo 0 ) AND ( ( random 100) <= _guerCh ) OR ( _m isEqualTo 1 ) AND ( ( random 100) <= _polrCh ) OR ( _m isEqualTo 2 ) AND ( ( random 100) <= _polsCh ) OR ( _m isEqualTo 3 ) AND ( ( random 100) <= _gendCh ) OR ( _m isEqualTo 4 ) AND ( (random 100) <= _bandCh ) ) then
                {
                    [ _this0, 1, format [ "adding a mean vehicle patrol to the invasion of %1 at %2", _ln, mapGridPosition _lp ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                    _classes = _hp1;
                    //if ( ( "Heli" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then { _classes append _hp2 };
                     if ( ( "ApexEnabled" call VEMFr_fnc_config ) isEqualTo "yes" ) then { _classes append _hp3 };
                    /////////////////////
                    //private ["_croad","_direction"];
                    _ps = [ _lp, 0, 100, 0, 0, 300, 0 ] call bis_fnc_findSafePos;  
                    _roadList = _ps nearRoads 100;
                    _roadlist=_roadlist call BIS_fnc_arrayShuffle;     
                    _cRoad=_roadlist select 0;   
                    _roadConnectedTo = roadsConnectedTo _cRoad;   
                    _connectedRoad = _roadConnectedTo select 0; 
                    _direction = [_cRoad, _connectedRoad] call BIS_fnc_DirTo;   
                    _veh = createVehicle [ selectRandom _classes, _cRoad, [], 0, "NONE"];
                    _veh setdir _direction;   
                    _veh setPosATL [ ( getPos _veh ) select 0, ( getPos _veh ) select 1, 0 ];
                    //_veh setPos [(getPos _veh select 0), getPos _veh select 1, getPos _veh select 2];
                                    
                    if ( _mod isEqualTo "Epoch" ) then { _veh call EPOCH_server_setVToken };
                    if ( _hp4 isEqualTo "yes" ) then { _veh lock true };

                    _trrts = allTurrets [ _veh, true ];
                    
                    
                    _hlGrp = ( [ _lp, 1, ( ( count _trrts ) + ( _veh emptyPositions "commander" ) + 1 ), _m, _this0 ] call VEMFr_fnc_spawnVEMFrAI ) select 0;
                    {
                        if ( ( ( _veh emptyPositions "driver" ) isEqualTo 1 ) AND ( _x isEqualTo ( leader ( group _x ) ) ) ) then { _x moveInDriver _veh }
                            else
                                {
                                    private "_path";
                                    {
                                        if ( isNull ( _veh turretUnit _x ) ) then { _path = _x };
                                    } forEach _trrts;

                                    if not ( isNil "_path" ) then { _x moveInTurret [ _veh, _path ] }
                                        else
                                            {
                                                if ( ( _veh emptyPositions "commander" ) > 0 ) then { _x moveInCommander _veh };
                                            };
                                };

                        _veh disableAI "LIGHTS";                              
                        _veh setPilotLight true;   
                        _nts pushBack _x;
                    } forEach ( units _hlGrp );

                    _wp = _hlGrp addWaypoint [ [ _lp select 0, _lp select 1, 50 ], 1, 1 ];
                    _wp setWaypointBehaviour "AWARE";
                    _wp setWaypointCombatMode "RED";
                    _wp setWaypointSpeed "LIMITED";
                    _wp setWaypointType "SAD";
                    //_wp setWaypointLoiterType "CIRCLE";
                    //_wp setWaypointLoiterRadius 200;
                    _hlGrp setCurrentWaypoint _wp;

                    [ _hlGrp ] ExecVM ( "signAI" call VEMFr_fnc_scriptPath );
                };
            ////  End of vehicle patrol  //////////
            ///////////////////////////////////////
            
            
            // Place the crate if enabled
            if (_ms14 isEqualTo "yes") then { call _dSpwnCrt };

            // Place mines if enabled
            private [ "_mnsPlcd", "_mines" ];
            if ( ( _m isEqualTo 0 ) AND ( _guerM isEqualTo "yes" ) OR ( _m isEqualTo 1 ) AND ( _polrM isEqualTo "yes" ) OR ( _m isEqualTo 2 ) AND ( _polsM isEqualTo "yes" ) OR ( _m isEqualTo 3 ) AND ( _gendM isEqualTo "yes" ) OR ( _m isEqualTo 4 ) AND ( _banditM isEqualTo "yes" ) ) then
            //if ( _ms18 isEqualTo "yes" ) then
                {
                    _mnsPlcd = [ _lp, 5, 100, _this0 ] call VEMFr_fnc_mines;
                    if not ( isNil "_mnsPlcd" ) then { [ _this0, 1, format [ "%1 mines placed at %2", count _mnsPlcd, _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) }
                    else { [ _this0, 0, format [ "failed to place %1 mines at %2", count _mnsPlcd, _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
                };

            // Wait for Mission Completion
            _h = [ _nts, _this0 ] ExecVM ( "killedMonitor" call VEMFr_fnc_scriptPath );
            waitUntil { if ( scriptDone _h ) then { true } else { uiSleep 1; false } };

            [ "DynamicLocationInvasion", 1, format [ "mission in %1 has been completed!", _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );

            if ( _ms12 isEqualTo "yes" ) then
                {
                    _u = uiNamespace getVariable "VEMFrUsedLocs";
                    _u deleteAt (_u find _l);
                };

            // Broadcast
            if ( _ms7 isEqualTo "yes" ) then
                {
                    if ( _m isEqualTo 0 ) then { [ "ColorEAST", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 Guerillas", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                    if ( _m isEqualTo 1 ) then { [ "ColorWEST", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 Police Forces", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                    if ( _m isEqualTo 2 ) then { [ "ColorPink", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 Special Forces", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                    if ( _m isEqualTo 3 ) then { [ "ColorBrown", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 Gendarmerie", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                    if ( _m isEqualTo 4 ) then { [ "ColorYellow", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 bandits", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
                };

            // Deal with the 50s
            if not ( isNil "_cl50s" ) then
                {
                    _d = ( [ [ "missionSettings", _this0 ], [ "cal50sDelete" ] ] call VEMFr_fnc_config ) select 0;
                    if ( _d isEqualTo "yes" ) then { { deleteVehicle _x } forEach _cl50s };
                    if ( _d isEqualTo "destroy" ) then { { _x setDamage 1 } forEach _cl50s };
                };

            if not ( isNil "_mrkr" ) then { deleteMarker _mrkr };
            if ( _ms14 isEqualTo "no" ) then { call _dSpwnCrt };

            // Put a marker on the crate if enabled
            if not ( isNil "_crate" ) then
                {
                    if not ( isNull _crate ) then
                        {
                            if not ( [ getPos _crate, 3 ] call VEMFr_fnc_playerNear ) then
                                {
                                    if ( _ms5 isEqualTo "yes" ) then
                                        {
                                            // If night, attach a chemlight
                                            if ( sunOrMoon <= 0.35 ) then
                                                {
                                                    [ _this0, 1, "attaching a chemlight to the crate" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                                                    _lightType = selectRandom _ms15;
                                                    ( _lightType createVehicle ( position _crate ) ) attachTo [ _crate, [ 0, 0, 0 ] ];
                                                } else
                                                {
                                                    [ _this0, 1, "attaching smoke to the crate" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                                                    // Attach smoke
                                                    _rndmColor = selectRandom _ms16;
                                                    ( createVehicle [ _rndmColor, getPos _crate, [], 0, "CAN_COLLIDE" ] ) attachTo [ _crate, [ 0, 0, 0 ] ];
                                                };
                                        };

                                    if ( _ms6 isEqualTo "yes" ) then
                                        {
                                            private "_mrkr";
                                            _mrkr = createMarker [ format [ "VEMF_lootCrate_ID%1", random 9000 ], position _crate ];
                                            _mrkr setMarkerShape "ICON";
                                            _mrkr setMarkerType "mil_box";
                                            _mrkr setMarkerColor "colorBlack";
                                            _mrkr setMarkerText " Loot";
                                            [ _crate, _mrkr ] spawn
                                                {
                                                    _crate = _this select 0;
                                                    _mrkr = _this select 1;
                                                    waitUntil { if ( [ getPos _crate, 3 ] call VEMFr_fnc_playerNear ) then { true } else { uiSleep 4; false } };
                                                    deleteMarker _mrkr;
                                                };
                                        };
                                };
                        } else
                        {
                            [ _this0, 0, "isNull _crate!" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                        };
                } else
                {
                    [ _this0, 0, "isNil _crate!" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                };


            // Explode or remove the mines
            if not ( isNil "_mnsPlcd" ) then
                {
                    if ( _ms19 isEqualTo "explode" ) then
                        {
                            [ _this0, _ln, _mnsPlcd ] spawn
                                {
                                    uiSleep ( 5 + ( random 2 ) );
                                    [ _this select 0, 1, format [ "starting to explode all %1 mines at %2", count ( _this select 2 ), _this select 1 ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                                    {
                                        if not ( isNull _x ) then
                                            {
                                                _x setDamage 1;
                                                uiSleep ( 1.25 + ( random 3.5 ) );
                                            };
                                    } forEach ( _this select 2 );
                                    [ _this select 0, 1, format [ "successfully exploded all %1 mines at %2", count ( _this select 2 ), ( _this select  1 ) ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                                };

                            _mnsPlcd = nil;
                        };
                    if ( _ms19 isEqualTo "yes" ) then
                        {
                            [ _mnsPlcd ] spawn
                                {
                                    {
                                        if not ( isNull _x ) then { deleteVehicle _x };
                                    } forEach ( _this select 0 );
                                };

                            [ _this0, 1, format [ "successfully deleted all %1 mines at %2", count _mnsPlcd, _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
                        };
                };

            // If enabled, fix all the lights
            if ( _ms9 isEqualTo "yes" ) then
                {
                    {
                        if ( ( damage _x ) > 0.94 ) then
                        {
                            _x setDamage 0;
                            uiSleep ( 1 + ( random 2 ) );
                        };
                    } forEach ( nearestObjects [ _lp, [ "Lamps_Base_F", "PowerLines_base_F", "Land_PowerPoleWooden_L_F", "Land_LampDecor_F", "Land_LampShabby_F", "Land_LampStreet_small_F", "Land_LampStreet_F", "Land_LampSolar_F", "Land_LampAirport_F", "land_LampHalogen_F", "Land_LampHarbour_F", "Land_LampStadium_F", "Land_PowerLine_01_pole_small_F", "Land_fs_roof_F" ], _ms10 ] );
            // tanoa  Land_PowerLine_01_pole_lamp_F    
                };
        } else
        { // If done waiting, and no players were detected
            [ _this0, 1, format [ "invasion of %1 @ %2 timed out.", _ln, mapGridPosition _lp ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
            if not ( isNil "_mrkr" ) then { deleteMarker _mrkr };
            _arr = uiNamespace getVariable "VEMFrUsedLocs";
            _arr deleteAt ( _arr find _l );
        };
    };
};

VEMFrInvasionCount = VEMFrInvasionCount - 1;
VEMFrMissionCount = VEMFrMissionCount - 1;
 

 

Share this post


Link to post
Share on other sites

Anyone know how to stop the ai spawning with dupe scope weapons, Noticed one ai on the patrol heli had a MK14 with a scope on and was dupeable at traders.

Share this post


Link to post
Share on other sites

Ah i rememebr now, the problem is the vanilla version uses O_G_Sharpshooter_F as it's class name, and sometimes fails to overrides its gear on a single ai resulting in one of them spawning with a MK14 with a dupe scope, just gotta find a replacement that's Opfor with a gun without attachments

 

Share this post


Link to post
Share on other sites

Hi there,

 

I'm running this version of vemf on both of my servers, one is Altis and the other is Chernarus. Everything works great on Altis but I am having a problem on the Cherno map where one of the mission markers does not show up on the map. The notification message appears and the mission spawns in the town but there is no square marker on the map. This is only happening on the Cherno map for some reason. If I set the number of missions to 4, four missions will spawn but only three of them will be marked on the map. If I set the number of missions to 2, two missions will spawn but only one of them will be marked on the map. This is bit of a problem for the players because they end up stumbling over the unmarked mission with deadly results that involve machine guns and rocket launchers. I hate to disable it because it's such an awesome mission system, but the complaints are getting hard to ignore. Does anyone have any idea why this would be happening? 

 

Thanks for your help!

Share this post


Link to post
Share on other sites

There doesn't seem to be much support for this addon but here I go again! The other issue I'm having with VEMF is that the Base Attack says "only players within a certain range of the attacked territory can see the mission announcement" but I only want the owner of the base to see the missions announcement. It confuses players when they start seeing a red flashing message on their screen that their base is getting attacked and they don't even have a base or are a long way away from their base. Is there anyway to limit this red flashing warning to just the base owner?

 

Thanks!

Share this post


Link to post
Share on other sites

×