Dawg Posted January 22, 2015 Report Share Posted January 22, 2015 I want to edit the items in the mission box's can anyone tell me if i got the class names right im not sure what im doing wrong but the weapons dont show up in the box's at all //Variables to Edit Below //This defines the range from center to spawn mapRange = 12000; //This defines center of mapRange mapCenter = [6322,7801,0]; //Minimum distance for AI To spawn away form another AI MinDistanceFromMission = 500; //This defines the minimum number of AI to spawn per mission blck_MinAI_Major = 10; blck_MinAI_Major2 = 10; blck_MinAI_Minor = 10; blck_MinAI_Minor2 = 10; //This defines the maximum number of AI to spawn per mission blck_MaxAI_Major = 15; blck_MaxAI_Major2 = 15; blck_MaxAI_Minor = 15; blck_MaxAI_Minor2 = 15; //This defines how long after an AI dies that it's body disappears. blck_aiCleanUpTimer = 600; // in seconds //Spawn time between AI blck_AISpawnTime = 600; //Time in seconds //Defines if it should spawn 3 AI Vehicles (Armed offroad) true = yes spawn vehicles false = no do not spawn vehicles blck_SpawnVeh_Major = true; blck_SpawnVeh_Major2 = true; blck_SpawnVeh_Minor = true; blck_SpawnVeh_Minor2 = true; //This Defines what goes into the box; blck_FillBoxes_Major = { private["_crate","_Weapons","_mags","_cfgweapons","_weapon","_plx","_mag","_mags","_allweap","_box"]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; _crate addMagazineCargoGlobal ["CinderBlocks",40]; _crate addMagazineCargoGlobal ["jerrycan_epoch",10]; _crate addMagazineCargoGlobal ["lighter_epoch",2]; _crate addMagazineCargoGlobal ["CircuitParts",10]; _crate addMagazineCargoGlobal ["WoodLog_EPOCH",50]; _crate addMagazineCargoGlobal ["ItemCorrugatedLg",20]; _crate addMagazineCargoGlobal ["ItemCorrugated",20]; _crate addMagazineCargoGlobal ["ItemMixOil",3]; _crate addMagazineCargoGlobal ["MortarBucket",20]; _crate addMagazineCargoGlobal ["PartPlankPack",20]; _crate addMagazineCargoGlobal ["ItemLockbox",2]; _crate addMagazineCargoGlobal ["MultiGun",2]; _crate addMagazineCargoGlobal ["Heal_EPOCH",2]; _crate addMagazineCargoGlobal ["Defib_EPOCH",1]; _crate addMagazineCargoGlobal ["Repair_EPOCH",2]; _crate addMagazineCargoGlobal ["EnergyPack",5]; _crate addMagazineCargoGlobal ["EnergyPackLg",2]; _crate addMagazineCargoGlobal ["WhiskeyNoodle",5]; _crate addMagazineCargoGlobal ["water_epoch",5]; }; blck_FillBoxes_Major2 = { private["_crate","_Weapons","_mags","_cfgweapons","_weapon","_plx","_mag","_mags","_allweap","_box"]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; _crate addMagazineCargoGlobal ["ItemSodaBurst",5]; _crate addMagazineCargoGlobal ["ItemSodaRbull",5]; _crate addMagazineCargoGlobal ["ItemTuna",5]; _crate addMagazineCargoGlobal ["ItemSeaBass",5]; _crate addMagazineCargoGlobal ["ItemTrout",5]; _crate addMagazineCargoGlobal ["CookedChicken_EPOCH",5]; _crate addMagazineCargoGlobal ["CookedRabbit_EPOCH",5]; _crate addMagazineCargoGlobal ["SnakeMeat_EPOCH",5]; _crate addMagazineCargoGlobal ["CookedGoat_EPOCH",5]; _crate addMagazineCargoGlobal ["CookedSheep_EPOCH",5]; _crate addMagazineCargoGlobal ["honey_epoch",5]; _crate addMagazineCargoGlobal ["sweetcorn_epoch",5]; _crate addMagazineCargoGlobal ["scam_epoch",5]; _crate addMagazineCargoGlobal ["meatballs_epoch",5]; _crate addMagazineCargoGlobal ["sardines_epoch",5]; _crate addMagazineCargoGlobal ["FoodWalkNSons",5]; _crate addMagazineCargoGlobal ["FoodSnooter",5]; _crate addMagazineCargoGlobal ["FoodMeeps",5]; _crate addMagazineCargoGlobal ["FoodBioMeat",5]; }; blck_FillBoxes_Minor = { private["_crate","_Weapons","_mags","_cfgweapons","_weapon","_plx","_mag","_mags","_allweap","_box"]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; _crate addMagazineCargoGlobal ["acc_flashlight",2]; _crate addMagazineCargoGlobal ["acc_pointer_IR",2]; _crate addMagazineCargoGlobal ["optic_Nightstalker",2]; _crate addMagazineCargoGlobal ["optic_SOS",2]; _crate addMagazineCargoGlobal ["optic_DMS",2]; _crate addMagazineCargoGlobal ["optic_tws_mg",2]; _crate addMagazineCargoGlobal ["muzzle_snds_H_MG",2]; _crate addMagazineCargoGlobal ["20Rnd_762x51_Mag",20]; _crate addMagazineCargoGlobal ["30Rnd_762x39_Mag",20]; _crate addMagazineCargoGlobal ["150Rnd_762x51_Box",20]; _crate addMagazineCargoGlobal ["150Rnd_762x51_Box_Tracer",20]; _crate addMagazineCargoGlobal ["30Rnd_65x39_caseless_green",20]; _crate addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag",20]; _crate addMagazineCargoGlobal ["M14_EPOCH",2]; _crate addMagazineCargoGlobal ["arifle_MX_SW_Black_F",2]; _crate addMagazineCargoGlobal ["arifle_Mk20_plain_F",2]; _crate addMagazineCargoGlobal ["arifle_Mk20C_plain_F",2]; _crate addMagazineCargoGlobal ["arifle_MX_SW_F",2]; _crate addMagazineCargoGlobal ["AKM_EPOCH",2]; }; blck_FillBoxes_Minor2 = { private["_crate","_Weapons","_mags","_cfgweapons","_weapon","_plx","_mag","_mags","_allweap","_box"]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; _crate addMagazineCargoGlobal ["LMG_Mk200_F",1]; _crate addMagazineCargoGlobal ["LMG_Zafir_F",1]; _crate addMagazineCargoGlobal ["m249_EPOCH",1]; _crate addMagazineCargoGlobal ["m249Tan_EPOCH",1]; _crate addMagazineCargoGlobal ["m107_EPOCH",1]; _crate addMagazineCargoGlobal ["srifle_EBR_F",1]; _crate addMagazineCargoGlobal ["5Rnd_127x108_Mag",10]; _crate addMagazineCargoGlobal ["7Rnd_408_Mag",10]; _crate addMagazineCargoGlobal ["srifle_LRR_F",1]; _crate addMagazineCargoGlobal ["200Rnd_556x45_M249",5]; _crate addMagazineCargoGlobal ["150Rnd_762x51_Box",5]; _crate addMagazineCargoGlobal ["200Rnd_65x39_cased_Box",5]; _crate addMagazineCargoGlobal ["3Rnd_HE_Grenade_shell",10]; _crate addMagazineCargoGlobal ["Repair_EPOCH",2]; _crate addMagazineCargoGlobal ["EnergyPack",5]; _crate addMagazineCargoGlobal ["ClaymoreDirectionalMine_Remote_Mag",2]; _crate addMagazineCargoGlobal ["SatchelCharge_Remote_Mag",2]; _crate addMagazineCargoGlobal ["DemoCharge_Remote_Mag",2]; _crate addMagazineCargoGlobal ["B_Carryall_ocamo",1]; }; Yes it is easy if you look down to where you can configure what weapons the AI use half the answer is there. Use this format and it should work. _crate addWeaponCargoGlobal ["LMG_Mk200_F",1]; Also your Multi tool is a weapon and the attachments for it are Items Link to comment Share on other sites More sharing options...
prone Posted January 23, 2015 Report Share Posted January 23, 2015 Here is what i have, it includes the global commands for each type. Weapon, Ammo, Backpack. Works fine for me, no errors so far. blck_FillBoxes_Minor = { private["_crate","_Weapons","_mags","_cfgweapons","_weapon","_plx","_mag","_mags","_allweap","_box"]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; clearBackpackCargoGlobal _crate; _crate addMagazineCargoGlobal ["CinderBlocks",15]; _crate addMagazineCargoGlobal ["jerrycan_epoch",2]; _crate addMagazineCargoGlobal ["lighter_epoch",1]; _crate addMagazineCargoGlobal ["CircuitParts",1]; _crate addMagazineCargoGlobal ["ItemScraps",10]; _crate addMagazineCargoGlobal ["ItemCorrugated",5]; _crate addMagazineCargoGlobal ["ItemMixOil",2]; _crate addMagazineCargoGlobal ["MortarBucket",6]; _crate addMagazineCargoGlobal ["ItemLockbox",1]; _crate addMagazineCargoGlobal ["PaintCanPur",2]; _crate addMagazineCargoGlobal ["PaintCanRed",2]; _crate addMagazineCargoGlobal ["PaintCanOra",2]; _crate addMagazineCargoGlobal ["PaintCanTeal",2]; _crate addMagazineCargoGlobal ["PaintCanYel",2]; _crate addWeaponCargoGlobal ["MultiGun",1]; _crate addWeaponCargoGlobal ["ChainSaw",1]; _crate addWeaponCargoGlobal ["Hatchet",1]; _crate addMagazineCargoGlobal ["EnergyPack",3]; _crate addBackpackCargoGlobal ["B_Carryall_oli",1]; _crate addBackpackCargoGlobal ["B_Carryall_oucamo",1]; }; blck_FillBoxes_Major2 = { private["_crate","_Weapons","_mags","_cfgweapons","_weapon","_plx","_mag","_mags","_allweap","_box"]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; clearBackpackCargoGlobal _crate; _crate addWeaponCargoGlobal ["m107_EPOCH",1]; _crate addWeaponCargoGlobal ["m249Tan_EPOCH",1]; _crate addWeaponCargoGlobal ["M14_EPOCH",1]; _crate addWeaponCargoGlobal ["Srifle_GM6_F",1]; _crate addWeaponCargoGlobal ["Srifle_LRR_F",1]; _crate addWeaponCargoGlobal ["arifle_MXM_Black_F",1]; _crate addWeaponCargoGlobal ["Rangefinder",2]; _crate addItemCargoGlobal ["optic_Nightstalker",1]; _crate addItemCargoGlobal ["muzzle_snds_B",1]; _crate addItemCargoGlobal ["optic_MRCO",1]; _crate addItemCargoGlobal ["optic_LRPS",1]; _crate addItemCargoGlobal ["optic_DMS",1]; _crate addMagazineCargoGlobal ["APERSTripMine_Wire_Mag",1]; _crate addMagazineCargoGlobal ["200Rnd_556x45_M249",3]; _crate addMagazineCargoGlobal ["7Rnd_408_Mag",3]; _crate addMagazineCargoGlobal ["5Rnd_127x108_APDS_Mag",2]; _crate addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag",3]; _crate addMagazineCargoGlobal ["5Rnd_127x108_Mag",4]; _crate addMagazineCargoGlobal ["20Rnd_762x51_Mag",4]; _crate addMagazineCargoGlobal ["10Rnd_762x51_Mag",4]; _crate addBackpackCargoGlobal ["B_Carryall_ocamo",1]; _crate addBackpackCargoGlobal ["B_Carryall_khk",1]; }; Link to comment Share on other sites More sharing options...
bFe Posted January 23, 2015 Report Share Posted January 23, 2015 Any way to make the loot dynamic? Link to comment Share on other sites More sharing options...
brr62 Posted January 23, 2015 Report Share Posted January 23, 2015 Does anyone have this mission system working with the new epoch update. i'm getting BE filter errors. Does anyone have the updated filters? Link to comment Share on other sites More sharing options...
steigleder Posted January 23, 2015 Report Share Posted January 23, 2015 Hello! I put all the files , as in the tutorial , I started the server and not give any error ... I need to edit a file to run ? Link to comment Share on other sites More sharing options...
Havik Posted January 23, 2015 Report Share Posted January 23, 2015 Hello! I put all the files , as in the tutorial , I started the server and not give any error ... I need to edit a file to run ? I'm not quite sure what you just said but I didn't see anything wrong with your server by your statement....Care to rephrase or use google translate? Link to comment Share on other sites More sharing options...
steigleder Posted January 24, 2015 Report Share Posted January 24, 2015 I sent all the files who are attached to the server , however the missions not worked ... wanted to know if I have to edit some .pbo Link to comment Share on other sites More sharing options...
stig010189 Posted January 25, 2015 Report Share Posted January 25, 2015 so i have a problem when ever i add wep/ or mag or anything the missions don't load up. the server will keep loading up and run but there no markers or anything here what in the init }; blck_FillBoxes_Minor = { private["_crate","_Weapons","_mags","_cfgweapons","_weapon","_plx","_mag","_mags","_allweap","_box"]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; _crate addWeaponCargoGlobal ["Srifle_LRR_F",1]; _crate addWeaponCargoGlobal ["Srifle_GM6_F",1]; _crate addWeaponCargoGlobal ["arifle_MXM_Black_F"1]; _crate addWeaponCargoGlobal ["srifle_DMR_01_ACO_F"1]; _crate addWeaponCargoGlobal ["srifle_EBR_F",1]; _crate addWeaponCargoGlobal ["Arifle_TRG21",1]; _crate addWeaponCargoGlobal ["Arifle_SDAR_F",1]; _crate addWeaponCargoGlobal ["Arifle_MX_F",1]; _crate addWeaponCargoGlobal ["Arifle_Mk20_F",1]; _crate addWeaponCargoGlobal ["TRG-20_F",1]; _crate addWeaponCargoGlobal ["arifle_MX_ACO_F",1]; _crate addWeaponCargoGlobal ["MultiGun",2]; _crate addWeaponCargoGlobal ["arifle_MX_Black_F",1]; _crate addWeaponCargoGlobal ["arifle_MX_F",1]; _crate addWeaponCargoGlobal ["arifle_MX_SW_Black_F",1]; _crate addWeaponCargoGlobal ["arifle_MXC_F",1]; _crate addWeaponCargoGlobal ["LMG_Mk200_F",1]; _crate addWeaponCargoGlobal ["LMG_Zafir_F",1]; _crate addWeaponCargoGlobal ["SMG_01_ACO_F",1]; _crate addWeaponCargoGlobal ["SMG_02_ACO_F",1]; }; blck_FillBoxes_Minor2 = { private["_crate","_Weapons","_mags","_cfgweapons","_weapon","_plx","_mag","_mags","_allweap","_box"]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; _crate addMagazineCargoGlobal ["30Rnd_65x39_caseless_green_mag_Tracer",5] _crate addMagazineCargoGlobal ["7Rnd_408_Mag",5]; _crate addMagazineCargoGlobal ["20Rnd_762x51_Mag",5]; _crate addMagazineCargoGlobal ["5Rnd_127x108_APDS_Mag",5]; _crate addMagazineCargoGlobal ["10Rnd_762x51_Mag",5]; _crate addMagazineCargoGlobal ["30Rnd_9x21_Mag",5]; _crate addMagazineCargoGlobal ["30Rnd_45ACP_Mag_SMG_01_tracer_green",5]; _crate addMagazineCargoGlobal ["150Rnd_762x51_Box_Tracer",5]; _crate addMagazineCargoGlobal ["200Rnd_65x39_cased_Box_Tracer",5]; _crate addMagazineCargoGlobal ["30Rnd_556x45_Stanag_Tracer_Yellow",5]; _crate addMagazineCargoGlobal ["30Rnd_556x45_Stanag_Tracer_Green",5]; _crate addMagazineCargoGlobal ["30Rnd_556x45_Stanag_Tracer_Red",5]; _crate addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag_Tracer",10]; _crate addMagazineCargoGlobal ["100Rnd_65x39_caseless_mag_Tracer",5]; _crate addAttachmentCargoGlobal ["muzzle_snds_H",1]; _crate addAttachmentCargoGlobal ["muzzle_snds_acp",1]; _crate addAttachmentCargoGlobal ["muzzle_snds_L",1]; _crate addAttachmentCargoGlobal ["muzzle_snds_M",1]; _crate addAttachmentCargoGlobal ["muzzle_snds_B",1]; _crate addAttachmentCargoGlobal ["muzzle_snds_H_MG",1]; _crate addAttachmentCargoGlobal ["optic_Arco",1]; _crate addAttachmentCargoGlobal ["optic_SOS",1]; _crate addAttachmentCargoGlobal ["acc_flashlight",1]; _crate addAttachmentCargoGlobal ["acc_pointer_IR",1]; _crate addAttachmentCargoGlobal ["optic_DMS",1]; _crate addAttachmentCargoGlobal ["optic_LRPS",1]; _crate addAttachmentCargoGlobal ["optic_Nightstalker",1]; _crate addAttachmentCargoGlobal ["optic_tws",1]; _crate addAttachmentCargoGlobal ["Binocular",1]; _crate addAttachmentCargoGlobal ["Rangefinder",1]; _crate addAttachmentCargoGlobal ["NVGoggles",1]; _crate addItemCargoGlobal ["FirstAidKit",10]; _crate addAttachmentCargoGlobal ["Laserdesignator",1]; _crate addAttachmentCargoGlobal ["B_UavTerminal",1]; _crate addAttachmentCargoGlobal ["O_UavTerminal",1]; _crate addAttachmentCargoGlobal ["I_UavTerminal",1]; }; Link to comment Share on other sites More sharing options...
Narines Posted January 25, 2015 Report Share Posted January 25, 2015 Hi ! First, thank you for your great script ! I've been using it on my server and I made a few modifications that solves a couple of problems. More precisely, I found why the AI was not behaving normally. It had to do with the fact that you were calling setcombatmode "RED"; on a unit instead of a group. (https://community.bistudio.com/wiki/setCombatMode). Thanks to Mister T for his script "Roaming AI in towns". That's where I got the hint from. I also changed how spawnVehicle is called to make sure that the AI controlling the vehicles are in the same group than the other AIs. This way, they strat chasing the player if he hits any other target. I thought I would share this with the community so here is the link for the updated "custom_server.pbo" file. https://dl.dropboxusercontent.com/u/63143678/custom_server.zip Here is, in more details, the modifications I made (I added comments starting with //NARINES// for every modification I made): AI.sqf (same with AI1.sqf) //Defines private variables so they don't interfere with other scripts private ["_pos","_i","_weap","_ammo","_other","_skin","_aiGroup","_ai1","_magazines","_players","_owner","_ownerOnline","_nearEntities"]; //Gets variables passed from spawnai.sqf/spawnai1.sqf _pos = _this select 0; _weap = _this select 1; _ammo = _this select 2; _other = _this select 3; _skin = _this select 4; _aiGroup = _this select 5; //NARINES// - ADDED THOSE 3 LINES _aiGroup setcombatmode "RED"; _aiGroup allowfleeing 0; _aiGroup setspeedmode "FULL"; //Creating the AI Unit _ai1 = ObjNull; //Creates the AI unit from the _skin passed to it "i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "COLONEL"]; //Cleans the AI to a fresh spawn removeBackpackGlobal _ai1; removeAllItemsWithMagazines _ai1; //_ai1 AddUniform _skin; _ai1 forceAddUniform _skin; //Stops the AI from being cleaned up _ai1 setVariable["LASTLOGOUT_EPOCH",1000000000000]; _ai1 setVariable["LAST_CHECK",1000000000000]; //Sets AI Skills _ai1 enableAI "TARGET"; _ai1 enableAI "AUTOTARGET"; _ai1 enableAI "MOVE"; _ai1 enableAI "ANIM"; _ai1 enableAI "FSM"; _ai1 allowDammage true; //NARINES// - REMOVED THE FOLLOWING //_ai1 setCombatMode "RED"; _ai1 setBehaviour "COMBAT"; sleep 1; //For some reason without this sometimes they don't spawn the weapon on them //Adds 5 magazines to AI Unit _ai1 addMagazine _ammo; _i = 0; while {_i < 4} do { _i = _i + 1; _ai1 addItem _ammo; }; //Adds the weapon specified to it from spawnai.sqf/spawnai1.sqf _ai1 addWeaponGlobal _weap; //diag_log format["AI1.sqf - AI %2 to recieve this weapon: %1",_weap,_ai1];// For debug sleep 1; //For some reason without this sometimes they don't spawn the weapon on them //_currentweapon = currentMuzzle _ai1;// For debug //diag_log format["AI1.sqf - AI %2 recieved this weapon: %1",_currentweapon,_ai1];// For debug //adds items to AI. _other = ["ITEM","COUNT"] _i = 0; while {_i < (_other select 1)} do { _i = _i + 1; _ai1 addItem (_other select 0) }; //Sets a variable that this is an AI... Can be used for other scipts to determine if its an AI unit _ai1 setVariable ["AI",true,true]; //Gives the AI unlimited Ammo _ai1 addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]; //AI Cleanup script _ai1 spawn { waitUntil{!alive _this}; _this setOwner 1; sleep blck_aiCleanUpTimer; deleteVehicle _this; }; //NARINES// - REMOVED THE FOLLING BLOCK. I ASSUME IT IS USELESS SINCE EPOCH FIXED THE AI NOT DAMAGING THE PLAYER /*//Prevents players from having AI God Mode while {true} do { _players = []; _nearEntities = count (_ai1 nearEntities [["MAN"],1000]); //diag_log format["_nearEntities: %1",_nearEntities]; //Used for testing { if (isPlayer _x) then { _players = _players + [_x]; }; } foreach (_ai1 nearEntities [["MAN"],1000]); //diag_log format["Nearplayers: %1",_players]; //Used for testing if ((count _players) > 0) then { _owner = _players call BIS_fnc_selectRandom; _ai1 setOwner (owner _owner); }; //diag_log format["_ai1 %2 Owner: %1",owner _ai1, _ai1]; //Used for testing waitUntil{_nearEntities != count (_ai1 nearEntities [["MAN"],1000])}; };*/ spawnVehicle.sqf //Debug information diag_log format["SpawnVehicles _this: %1",_this]; //Gets position information from spawnai1.sqf _pos = _this select 0; //Creates a group for Vehicles //NARINES// - REMOVED THE FOLLOWING //_aiGroup = createGroup RESISTANCE; //NARINES// -ADDED THE FOLLOWING _aiGroup = _this select 1; //NARINES// - ADDED THE FOLLOWING 3 LINES _aiGroup setcombatmode "RED"; _aiGroup allowfleeing 0; _aiGroup setspeedmode "FULL"; _ai = ObjNull; //Finds a safe positon in area to spawn _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; //Spawns 1 AI Unit "O_G_Soldier_SL_F" createUnit [_safepos, _aiGroup, "_ai = this", 0.1, "PRIVATE"]; removeBackpackGlobal _ai; removeAllItemsWithMagazines _ai; _ai setVariable["LASTLOGOUT_EPOCH",1000000000000]; _ai setVariable["LAST_CHECK",1000000000000]; _ai enableAI "TARGET"; _ai enableAI "AUTOTARGET"; _ai enableAI "MOVE"; _ai enableAI "ANIM"; _ai enableAI "FSM"; _ai allowDammage true; _ai setCombatMode "RED"; _ai setBehaviour "COMBAT"; _ai setVariable ["AI",true,true]; //Spawns 1 AI Unit _ai1 = ObjNull; _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; "O_G_Soldier_SL_F" createUnit [_safepos, _aiGroup, "_ai1 = this", 0.1, "PRIVATE"]; removeBackpackGlobal _ai1; removeAllItemsWithMagazines _ai1; _ai1 setVariable["LASTLOGOUT_EPOCH",1000000000000]; _ai1 setVariable["LAST_CHECK",1000000000000]; _ai1 enableAI "TARGET"; _ai1 enableAI "AUTOTARGET"; _ai1 enableAI "MOVE"; _ai1 enableAI "ANIM"; _ai1 enableAI "FSM"; _ai1 allowDammage true; _ai1 setCombatMode "RED"; _ai1 setBehaviour "COMBAT"; _ai1 setVariable ["AI",true,true]; //Spawns 1 AI Unit _ai2 = ObjNull; _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; "O_G_Soldier_SL_F" createUnit [_safepos, _aiGroup, "_ai2 = this", 0.1, "PRIVATE"]; removeBackpackGlobal _ai2; removeAllItemsWithMagazines _ai2; _ai2 setVariable["LASTLOGOUT_EPOCH",1000000000000]; _ai2 setVariable["LAST_CHECK",1000000000000]; _ai2 enableAI "TARGET"; _ai2 enableAI "AUTOTARGET"; _ai2 enableAI "MOVE"; _ai2 enableAI "ANIM"; _ai2 enableAI "FSM"; _ai2 allowDammage true; _ai2 setCombatMode "RED"; _ai2 setBehaviour "COMBAT"; _ai2 setVariable ["AI",true,true]; //Spawns 1 AI Unit _ai3 = ObjNull; _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; "O_G_Soldier_SL_F" createUnit [_safepos, _aiGroup, "_ai3 = this", 0.1, "PRIVATE"]; removeBackpackGlobal _ai3; removeAllItemsWithMagazines _ai3; _ai3 setVariable["LASTLOGOUT_EPOCH",1000000000000]; _ai3 setVariable["LAST_CHECK",1000000000000]; _ai3 enableAI "TARGET"; _ai3 enableAI "AUTOTARGET"; _ai3 enableAI "MOVE"; _ai3 enableAI "ANIM"; _ai3 enableAI "FSM"; _ai3 allowDammage true; _ai3 setCombatMode "RED"; _ai3 setBehaviour "COMBAT"; _ai3 setVariable ["AI",true,true]; //Spawns 1 AI Unit _ai4 = ObjNull; _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; "O_G_Soldier_SL_F" createUnit [_safepos, _aiGroup, "_ai4 = this", 0.1, "PRIVATE"]; removeBackpackGlobal _ai4; removeAllItemsWithMagazines _ai4; _ai4 setVariable["LASTLOGOUT_EPOCH",1000000000000]; _ai4 setVariable["LAST_CHECK",1000000000000]; _ai4 enableAI "TARGET"; _ai4 enableAI "AUTOTARGET"; _ai4 enableAI "MOVE"; _ai4 enableAI "ANIM"; _ai4 enableAI "FSM"; _ai4 allowDammage true; _ai4 setCombatMode "RED"; _ai4 setBehaviour "COMBAT"; _ai4 setVariable ["AI",true,true]; //Spawns 1 AI Unit _ai5 = ObjNull; _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; "O_G_Soldier_SL_F" createUnit [_safepos, _aiGroup, "_ai5 = this", 0.1, "PRIVATE"]; removeBackpackGlobal _ai5; removeAllItemsWithMagazines _ai5; _ai5 setVariable["LASTLOGOUT_EPOCH",1000000000000]; _ai5 setVariable["LAST_CHECK",1000000000000]; _ai5 enableAI "TARGET"; _ai5 enableAI "AUTOTARGET"; _ai5 enableAI "MOVE"; _ai5 enableAI "ANIM"; _ai5 enableAI "FSM"; _ai5 allowDammage true; _ai5 setCombatMode "RED"; _ai5 setBehaviour "COMBAT"; _ai5 setVariable ["AI",true,true]; //Spawns a AI Vehicle _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; _veh = ObjNull; _veh = createVehicle["B_G_Offroad_01_armed_F", _safepos, [], 0, "NONE"]; _veh setVariable["LASTLOGOUT_EPOCH",1000000000000]; _veh setVariable["LAST_CHECK",1000000000000]; //Moves 2 AI units into vehicle _ai moveInAny _veh; _ai1 moveInAny _veh; //So Vehicle doesnt despawn EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1; EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit); _slot = EPOCH_VehicleSlots select 0; _veh setVariable ['VEHICLE_SLOT',_slot,true]; EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot]; EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots; publicVariable 'EPOCH_VehicleSlotCount'; _veh call EPOCH_server_setVToken; //Creates vehicle inventory clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; clearBackpackCargoGlobal _veh; clearItemCargoGlobal _veh; _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; _veh = ObjNull; _veh = createVehicle["B_G_Offroad_01_armed_F", _safepos, [], 0, "NONE"]; _veh setVariable["LASTLOGOUT_EPOCH",1000000000000]; _veh setVariable["LAST_CHECK",1000000000000]; _ai2 moveInAny _veh; _ai3 moveInAny _veh; EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1; EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit); _slot = EPOCH_VehicleSlots select 0; _veh setVariable ['VEHICLE_SLOT',_slot,true]; EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot]; EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots; publicVariable 'EPOCH_VehicleSlotCount'; _veh call EPOCH_server_setVToken; clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; clearBackpackCargoGlobal _veh; clearItemCargoGlobal _veh; _safepos = [_pos,0,27,0,0,20,0] call BIS_fnc_findSafePos; _veh = ObjNull; _veh = createVehicle["B_G_Offroad_01_armed_F", _safepos, [], 0, "NONE"]; _veh setVariable["LASTLOGOUT_EPOCH",1000000000000]; _veh setVariable["LAST_CHECK",1000000000000]; _ai4 moveInAny _veh; _ai5 moveInAny _veh; EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1; EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit); _slot = EPOCH_VehicleSlots select 0; _veh setVariable ['VEHICLE_SLOT',_slot,true]; EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot]; EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots; publicVariable 'EPOCH_VehicleSlotCount'; _veh call EPOCH_server_setVToken; clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; clearBackpackCargoGlobal _veh; clearItemCargoGlobal _veh; spawnai.sqf (same with spawnai1.sqf) //Sets Private Variables to they don't interfere when this script is called more than once private["_pos","_weaponlist","_ammolist","_skinlist","_itemlist","_randomNumberWeapon","_randomNumberSkin","_randomNumberItem","_numbertospawn","_whichweap","_whichitem","_whichskin","_weapon","_ammo","_item","_skin","_i"]; //Gets variables passed form SM1.sqf _pos = _this select 0; _numai1 = _this select 1; _numai2 = _this select 2; _weaponList = _this select 3; _spawnVehicle = _this select 4; //Spawns correct ammount of AI if (_numai2 > _numai1) then { _numbertospawn = floor( (random (_numai2 - _numai1) + _numai1 ) ); } else { _numbertospawn = _numai2; }; //Creates a group to make them attack players _aiGroup = createGroup RESISTANCE; //Counter variable _i = 0; //Spawns the correct number of AI Units while {_i < _numbertospawn} do { _i = _i + 1; //Weapons Selects _whichweap = _weaponList call BIS_fnc_selectRandom; //diag_log format["AI Got this weapon array: %1",_whichweap];// For debug //assigns class name based on random number generated _weapon = _whichweap select 0; //diag_log format["AI Got this weapon: %1",_weapon];// For debug //This isnt reall needed anymore -- but it needs to have something passed _ammo = _whichweap select 1; //diag_log format["AI Got this weapon magazine: %1",_ammo];// For debug //Selects a random item from blck_AIItemList to add to the AI... _item = blck_AIItemList call BIS_fnc_selectRandom; //diag_log format["AI Got this item: %1",_item];// For debug //Selects a random skin _skin = blck_SkinList call BIS_fnc_selectRandom; //diag_log format["AI Got this skin: %1",_skin];// For debug //Finds a safe positon to spawn the AI in the area given _safepos = [_pos,0,27,1,0,2000,0] call BIS_fnc_findSafePos; //Spawns the AI units [_safepos,_weapon,_ammo,_item,_skin,_aiGroup] execVM "\q\addons\custom_server\AIMission\AI1.sqf"; }; if (_spawnVehicle) then { //Finds a safe postion to spawn the vehicles _safepos = [_pos,0,27,1,0,2000,0] call BIS_fnc_findSafePos; //Spawns the vehicles //NARINES// - REMOVED THE FOLLOWING //[_safepos] execVM "\q\addons\custom_server\AIMission\spawnVehicle.sqf"; //NARINES// - ADDED THE FOLLOWING [_safepos, _aiGroup] execVM "\q\addons\custom_server\AIMission\spawnVehicle.sqf"; }; teamcrisiz and bFe 2 Link to comment Share on other sites More sharing options...
cyncrwler Posted January 25, 2015 Report Share Posted January 25, 2015 The changes made seem to be working well, and the AI seem to be quite a bit more active. Thanks for the changes! bFe and Narines 2 Link to comment Share on other sites More sharing options...
krom Posted January 25, 2015 Report Share Posted January 25, 2015 The changes made seem to be working well, and the AI seem to be quite a bit more active. Thanks for the changes! Ditto, good change. Link to comment Share on other sites More sharing options...
krom Posted January 25, 2015 Report Share Posted January 25, 2015 pretty missions, but pretty bug also too! - lock unlock problems - sell problems Same problem here with the map vehicles being inaccessible after about 30 minutes into a server start. The vehicles will be there and if no one has interacted with them before the 25-30 minute mark you will be able to get into the vehicle but thats it. Once in you cant get out, move, start engine, etc. Going to lobby and coming back in puts you outside the vehicle but if you try to delete the vehicle with admin tools a "object does not exist" message appears. This is a good mission add on but with vehicles getting bugged after 25 minutes or so we cant run on the server :( Link to comment Share on other sites More sharing options...
Narines Posted January 25, 2015 Report Share Posted January 25, 2015 The changes made seem to be working well, and the AI seem to be quite a bit more active. Thanks for the changes! Always glad to help ! Link to comment Share on other sites More sharing options...
Narines Posted January 25, 2015 Report Share Posted January 25, 2015 Same problem here with the map vehicles being inaccessible after about 30 minutes into a server start. The vehicles will be there and if no one has interacted with them before the 25-30 minute mark you will be able to get into the vehicle but thats it. Once in you cant get out, move, start engine, etc. Going to lobby and coming back in puts you outside the vehicle but if you try to delete the vehicle with admin tools a "object does not exist" message appears. This is a good mission add on but with vehicles getting bugged after 25 minutes or so we cant run on the server :( I don't have this problem. I even made tests on my local server where I kill AI, get vehicle, lock vehicle, delog, restart server, relog and wait for 1h before interacting with it. Still working fine. Link to comment Share on other sites More sharing options...
buck0rue Posted January 26, 2015 Report Share Posted January 26, 2015 Nice it all works' Thinking of a change it up... maybe the AI could be dino's or dogs I could get my hunting party on. I play off line (lan) with dedicated server setup, not worried about battleye or hacks. by the way to keep AI on Chernarus map. Edit custom.server.pbo mapRange = 6000; mapCenter =[6000,7000,0]; MinDistanceFromMission = 500; Link to comment Share on other sites More sharing options...
HackSaW_TM Posted January 26, 2015 Report Share Posted January 26, 2015 Hello I am New here and I am trying to get this mission working on my server. I have followed all the steps but i cant get the mission working. Please advise. I have attached so far what i did Link to comment Share on other sites More sharing options...
rhughes945 Posted January 26, 2015 Report Share Posted January 26, 2015 No, don't edit the custom_server.pbo Edit your epoch.chernarus/altis/stratis/bornholm.pbo file. Add the code to your init.sqf and put the debug folder in there too. Better off using Notepad++, it reads sqf's alot better. Link to comment Share on other sites More sharing options...
HackSaW_TM Posted January 26, 2015 Report Share Posted January 26, 2015 Doing it now let you know Link to comment Share on other sites More sharing options...
HackSaW_TM Posted January 26, 2015 Report Share Posted January 26, 2015 DEbub Inside chernarus? Link to comment Share on other sites More sharing options...
HackSaW_TM Posted January 26, 2015 Report Share Posted January 26, 2015 DONE all you said but is giving me battle eye script restriction #0 Any ideas? Link to comment Share on other sites More sharing options...
HackSaW_TM Posted January 26, 2015 Report Share Posted January 26, 2015 Please help this is my init.sqf from MPMissions and is giving me battleey script restriction #0 //Everything below this line is only executed on the client (player or local host) SEM_client_createMissionMarker = { private ["_create","_markerTimeout","_markerPos","_markerID","_markerA","_markerB"]; _create = _this select 0; //Create Marker if(_create)then[{ _markerPos = _this select 1; _markerID = _this select 2; _markerA = createMarkerLocal [format["SEM_MissionMarkerA_%1", _markerID], _markerPos]; _markerB = createMarkerLocal [format["SEM_MissionMarkerB_%1", _markerID], _markerPos]; { _x setMarkerShapeLocal "ELLIPSE"; _x setMarkerSizeLocal [350,350]; _x setMarkerPosLocal _markerPos}forEach [_markerA,_markerB]; _markerA setMarkerBrushLocal "Cross"; _markerA setMarkerColorLocal "ColorYellow"; _markerB setMarkerBrushLocal "Border"; _markerB setMarkerColorLocal "ColorRed"; },{ //else delete marker _this spawn { private ["_markerTimeout","_markerID"]; _markerTimeout = _this select 1; _markerID = _this select 2; if(_markerTimeout > 0)then{ format["SEM_MissionMarkerB_%1", _markerID] setMarkerColorLocal "ColorGreen"; sleep _markerTimeout; }; if (getMarkerColor format["SEM_MissionMarkerA_%1", _markerID] != "")then{ //Only delete existing Marker deleteMarkerLocal format["SEM_MissionMarkerA_%1", _markerID]; deleteMarkerLocal format["SEM_MissionMarkerB_%1", _markerID]; }; }; }]; }; if(!isNil "SEM_globalMissionMarker")then{SEM_globalMissionMarker call SEM_client_createMissionMarker}; "SEM_globalMissionMarker" addPublicVariableEventHandler {_this select 1 call SEM_client_createMissionMarker}; "SEM_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]; }; "SEM_vehDamage" addPublicVariableEventHandler { private ["_vk","_vP","_s"]; _vk = _this select 1; _vP = vehicle player; if(!local _vk)exitWith{}; if(_vk != _vP)exitWith{}; _s = [ "MOTOR","karoserie","palivo","glass1","glass2","glass3","door1","door2","door3","door4", "wheel_1_1_steering","wheel_2_1_steering","wheel_1_2_steering","wheel_2_2_steering", "wheel_1_3_steering","wheel_2_3_steering","wheel_1_4_steering","wheel_2_4_steering"]; {_vk setHit [_x,(_vk getHit _x)+(.2+(random .15))]}count _s; }; [] spawn { /* This is the advertisement. If You don't like it, remove it */ waitUntil{vehicle player == player && time > 120 && !isNil "SEM_version"}; systemChat format["Welcome to EPOCH survivor %2", str(toUpper worldName), name player]; systemChat format["This server is running %1 v%2", str "Simple Epoch Missions", SEM_version]; }; /* End of advertisement */ Link to comment Share on other sites More sharing options...
krom Posted January 26, 2015 Report Share Posted January 26, 2015 I don't have this problem. I even made tests on my local server where I kill AI, get vehicle, lock vehicle, delog, restart server, relog and wait for 1h before interacting with it. Still working fine. We did an upgrade on both ou test and production box yesterday to the latest Epoch Server, Infi*, MAS, AiA, etc and (knock on wood) all is running well. Vehicles are not bugging out after 25-30 minutes and technicals, with the exception of 1 each restart, are deleting after restart. So we have this running in parallel with VEMF and things are clipping along well. Link to comment Share on other sites More sharing options...
doomdpanic Posted January 27, 2015 Report Share Posted January 27, 2015 hello does anyone know why the standard arma3 weapons and such i put in the crate wont spawn ? the ammo spawns but no weapons for some reason Link to comment Share on other sites More sharing options...
cyncrwler Posted January 27, 2015 Report Share Posted January 27, 2015 hello does anyone know why the standard arma3 weapons and such i put in the crate wont spawn ? the ammo spawns but no weapons for some reason We need a little more info than that. How exactly did you add them...addItemCargo addWeaponCargo or addMagazineCargo? Link to comment Share on other sites More sharing options...
HackSaW_TM Posted January 27, 2015 Report Share Posted January 27, 2015 Hello Where exactly to overwrite coordenate for Chernarus map. Is the instructions for all the foldes SM1 . MAjor/MAjor2/Minor/Minor2? This is the script please help private ["_coords","_MainMarker","_wait","_crate"]; //Find a safe position on map to spawn marker and AI units _FindNewPosition = false; _coords = [mapCenter,300,mapRange,30,0,10,0] call BIS_fnc_findSafePos; { if ((_x distance _coords) < MinDistanceFromMission) then { _FindNewPosition = true; }; } foreach AllMissionCoords; if (_FindNewPosition) exitWith {[] execVM "\q\addons\custom_server\AIMission\Major\SM1.sqf"}; AllMissionCoords = AllMissionCoords + [_coords]; //Sleeps specifed ammount in init.sqf sleep blck_AISpawnTime; //Sends message to all players about the AI Mission ["AI mission has spawned! Check your map for the location!"] execVM "\q\addons\custom_server\AIMission\AIM.sqf"; //Sets public variable for all units to see mapmarker Ccoords = _coords; publicVariable "Ccoords"; [] execVM "debug\addmarkers.sqf"; //Crates the crate _crate = objNull; _crate = createVehicle ["Box_NATO_Wps_F",[(_coords select 0) - 3, _coords select 1,0],[], 0, "CAN_COLLIDE"]; //Sets variables (not sure if needed but left just incase so cleanup doesnt happen _crate setVariable ["Mission",1,true]; _crate setVariable ["ObjectID","1",true]; _crate setVariable ["permaLoot",true,true]; //Fills the crate with items [_crate] call blck_FillBoxes_Major; //Spawns the AI [_coords,blck_MinAI_Major,blck_MaxAI_Major,blck_WeaponList_Major,blck_SpawnVeh_Major] execVM "\q\addons\custom_server\AIMission\spawnai.sqf"; //Waits until player gets near the _crate to end mission waitUntil{{isPlayer _x && _x distance _crate < 10 } count playableunits > 0}; //Announces that the mission is complete ["The AI Mission is under survivor control!"] execVM "\q\addons\custom_server\AIMission\AIM.sqf"; //Remove AI Mission Position Tracker AllMissionCoords = AllMissionCoords - [_coords]; //Removes the markers [] execVM "debug\remmarkers.sqf"; MissionGo = 0; Ccoords = 0; publicVariable "Ccoords"; //Spawns mission again [] execVM "\q\addons\custom_server\AIMission\major\SM1.sqf"; Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now