the AI disappear right when killed, their bodies gone and nothing to loot, if I exit then come back in the bodies are on the ground and lootable..
I am having this exact same issue, has anyone found a fix?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
the AI disappear right when killed, their bodies gone and nothing to loot, if I exit then come back in the bodies are on the ground and lootable..
I am having this exact same issue, has anyone found a fix?
zombie_generate = compile preprocessFileLineNumbers "scripts\zombie_generate.sqf";
if (isServer) then {
// For settings involving the factions, go to scripts\add_unit_server.sqf and adjust the settings at the top of the file
_factions = [] execVM "scripts\set_unit_faction.sqf";
//_aispawnpos - Worldspace location
//_wpradius - Distance you want units to be able to travel
//_wpnum - Number of waypoints to place withing that distance. The higher the number, the more extensively the units will travel
//_numunits - Number of units to place. Keep in mind that squads will be placed in multiples of this number
//_unitType - Type of unit to place. 0: Random, 1: Sniper, 2: Gunner, 3: Militia, 4: Squad of the previous 3 types
//_faction - The type of faction you want this unit to adhere to. 0: RESISTANCE, 1: EAST, 2: WEST. Factions loyalties are set in scripts\set_unit_faction.sqf
//_baseSkill - Lowest possible skill that the units can posess from 1 to 10
//_potentialSkill - Highes possible skill that the units can posess from 1 to 10
//_gearSet - Which set of gear your units will use. To set the types of gear, edit the variables at the top of scripts\add_units_server.sqf
//_respawnTime - How long to wait until NPCs respawn (in seconds)
_aispawn = [[3993.98,4193.84,0],100,5,1,4,1,7,10,0,1800] execVM "scripts\add_unit_server.sqf";
};
// Compile and call important functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
progressLoadingScreen 1.0;
zombie_generate = compile preprocessFileLineNumbers "scripts\zombie_generate.sqf";
// Run the server monitor
if (isServer) then {
_serverMonitor = [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";
// For settings involving the factions, go to scripts\add_unit_server.sqf and adjust the settings at the top of the file
_factions = [] execVM "scripts\set_unit_faction.sqf";
//_aispawnpos - Worldspace location
//_wpradius - Distance you want units to be able to travel
//_wpnum - Number of waypoints to place withing that distance. The higher the number, the more extensively the units will travel
//_numunits - Number of units to place. Keep in mind that squads will be placed in multiples of this number
//_unitType - Type of unit to place. 0: Random, 1: Sniper, 2: Gunner, 3: Militia, 4: Squad of the previous 3 types
//_faction - The type of faction you want this unit to adhere to. 0: RESISTANCE, 1: EAST, 2: WEST. Factions loyalties are set in scripts\set_unit_faction.sqf
//_baseSkill - Lowest possible skill that the units can posess from 1 to 10
//_potentialSkill - Highes possible skill that the units can posess from 1 to 10
//_gearSet - Which set of gear your units will use. To set the types of gear, edit the variables at the top of scripts\add_units_server.sqf
//_respawnTime - How long to wait until NPCs respawn (in seconds)
_aispawn = [[3993.98,4193.84,0],100,5,1,4,0,7,10,1,1800] execVM "scripts\add_unit_server.sqf";
}
// to add more gear sets, just add another case, and copy and paste the variables from one of the other cases into it, and then reference it in the init.
switch (_gearSet) do {
case 0 : {
_sniperSkin = "BAF_Soldier_Sniper_MTP";
_sniperRifle = "BAF_AS50_scoped";
_sniperAmmo = "5RND_127x99_as50";
_sniperAmmoCount = 10;
_sniperGear = ["ItemBandage"];
_sniperWeapons = ["ItemMatchbox"];
_gunnerSkin = "BAF_Soldier_MTP";
_gunnerRifle = "Mk_48_DZ";
_gunnerAmmo = "100Rnd_762x51_M240";
_gunnerAmmoCount = 10;
_gunnerGear = ["ItemBandage"];
_gunnerWeapons = ["ItemMatchbox"];
_militiaSkin = "BAF_Soldier_L_MTP";
_militiaRifle = "BAF_L85A2_RIS_CWS";
_militiaAmmo = "30Rnd_556x45_StanagSD";
_militiaAmmoCount = 10;
_militiaGear = ["ItemBandage"]; // Additional gear (does not include tools or guns)
_militiaWeapons = ["ItemMatchbox"]; //Additional Guns and Tools
};
case 1 : {
_sniperSkin = "Citizen3";
_sniperRifle = "LeeEnfield";
_sniperAmmo = "10x_303";
_sniperAmmoCount = 3;
_sniperGear = ["ItemBandage"];
_sniperWeapons = ["ItemMatchbox"];
_gunnerSkin = "Worker1";
_gunnerRifle = "Winchester1866";
_gunnerAmmo = "15Rnd_W1866_Slug";
_gunnerAmmoCount = 3;
_gunnerGear = ["ItemBandage"];
_gunnerWeapons = ["ItemMatchbox"];
_militiaSkin = "Villager1";
_militiaRifle = "revolver_EP1";
_militiaAmmo = "6Rnd_45ACP";
_militiaAmmoCount = 3;
_militiaGear = ["ItemBandage"]; // Additional gear (does not include tools or guns)
_militiaWeapons = ["ItemMatchbox"]; //Additional Guns and Tools
};
case 2 : {
_sniperSkin = "Citizen3";
_sniperRifle = "BAF_AS50_scoped";
_sniperAmmo = "5RND_127x99_as50";
_sniperAmmoCount = 3;
_sniperGear = ["ItemBandage"];
_sniperWeapons = ["ItemMatchbox"];
_gunnerSkin = "BAF_Soldier_Sniper_MTP";
_gunnerRifle = "Winchester1866";
_gunnerAmmo = "15Rnd_W1866_Slug";
_gunnerAmmoCount = 3;
_gunnerGear = ["ItemBandage"];
_gunnerWeapons = ["ItemMatchbox"];
_militiaSkin = "Villager1";
_militiaRifle = "revolver_EP1";
_militiaAmmo = "6Rnd_45ACP";
_militiaAmmoCount = 3;
_militiaGear = ["ItemBandage"]; // Additional gear (does not include tools or guns)
_militiaWeapons = ["ItemMatchbox"]; //Additional Guns and Tools
};
};
_aispawn = [[3993.98,4193.84,0],100,5,1,4,0,7,10,2,1800] execVM "scripts\add_unit_server.sqf";
Morox, awesome of you to break it down for everyone. I too am a beginner and did initially learn this by bugging other posters but hopefully the will save some people some time. I had my AI working wonderfully for several days but suddenly they stopped. They never did respawn either. If there's any chance you'd feel like taking a look, I posted my files a few pages back. Thanks again!
What do I need to change to make it so the ai EAST soldiers (hostile to everyone), do not shoot at zeds?
Sorry didn't answer the east question, if you are using the files from the first post the factions are controlled by the set_unit_faction.sqf, mine looks likeI believe if you remove the zombie_gen line from your init.sqf, the AI will not attack zeds - if I have followed the thread correctly, currently rebuilding my server so I cannot test.
waitUntil{initialized};
//0Day
createCenter east;
createCenter resistance;
//Survivors
WEST setFriend [RESISTANCE,.7];
WEST setFriend [EAST,0];
//AI Units
RESISTANCE setFriend [WEST,.7];
RESISTANCE setFriend [EAST,0];
//AI Units 2
EAST setFriend [WEST,0];
EAST setFriend [RESISTANCE,0];
_aispawn = [[3993.98,4193.84,0],100,5,1,4,1,7,10,1,1800] execVM "scripts\add_unit_server.sqf";
If you remove the lift and tow packages does it work, I am thinking there may be an overlapping global variable that is causing the issue, I have acquired the BTC files and will try to replicate your setup.I removed fast rope, but still no AII really just don't know....
I can confirm that I am using fast rope, BTC lift, and the ai. How many ai are you spawning?
// to add more gear sets, just add another case, and copy and paste the variables from one of the other cases into it, and then reference it in the init.
switch (_gearSet) do {
case 0 : {
_sniperSkin = "BAF_Soldier_Sniper_MTP";
_sniperRifle = "DMR";
_sniperAmmo = "20Rnd_762x51_DMR";
_sniperAmmoCount = 10;
_sniperGear = ["ItemBandage"];
_sniperWeapons = ["ItemMatchbox"];
_gunnerSkin = "BAF_Soldier_MTP";
_gunnerRifle = "Mk_48_DZ";
_gunnerAmmo = "100Rnd_762x51_M240";
_gunnerAmmoCount = 10;
_gunnerGear = ["ItemBandage"];
_gunnerWeapons = ["ItemMatchbox"];
_militiaSkin = "BAF_Soldier_L_MTP";
_militiaRifle = "G36C";
_militiaAmmo = "30Rnd_556x45_Stanag";
_militiaAmmoCount = 10;
_militiaGear = ["ItemBandage"]; // Additional gear (does not include tools or guns)
_militiaWeapons = ["ItemMatchbox"]; //Additional Guns and Tools
};
bravo my friend. you saved me some valuable time from making my video tutorial.