Simple AI Tutorial (no rMod or DayZ_Factions)

thats what i dont get as to why they spawn first seeable then respawn invisible. could i have a look at your richie just incase i missed something out mate

EDIT: also how do you make them not disappear straight away when they die or is that something thats being worked on?
 
What files do you want Scottieo ?
I've not actully looked to see if the respawns are invisable, to compensate for them respawning at the last spawn point i've changed the last line to somewhere i want them always.
I'll go kill some soon and let you know, might be a while as i'm downloading Arma 3 and my line sucks :( can't play anything until it's downloaded.
 
i use unbanned skins, default player ones as a test, and same thing when they get shot they go invis, you relog and they are there
 
Mine are doing the same thing as several other peoples in here, respawning at the last aispawn point on the init

Anyone figure this out yet?
 
im going to give it a shot at sorting these things out but no promises tho but i will give them a good go and if it works then i will upload my work for everyone
 
ok well so far to make them not disappear and be visable when they respawn go into your unit_killed file and at the bottom you will see this _player hideObject true; change the true to false and i also changed the respawnTime = _respawnTime; line thats just above it and took out the _ not sure if that made it different also but its what i have done. i will edit this post once i find the way to make them respawn at there places. sorry for the late reply with everything i have been out and only actually started this about 20 minutes ago.
 
What would happen if i gave AI for example a KSVK or PK? Because since hackers can get it into the game by boxes couldnt i with AI since it isnt a loot drop
 
What would happen if i gave AI for example a KSVK or PK? Because since hackers can get it into the game by boxes couldnt i with AI since it isnt a loot drop
You will most likely need Rmod2, scripters bypass BE and filters but the AI don't
 
Without rMod or rMod2 i very much doubt it, try it though i'm just guessing as that's how Dayz usually works.
 
So I have been having problems that come and go. I was able to get about 5/6 spawn groups in, but once I add one more none will spawn. If I were to remove that spawn group none of them still spawn. It doesn't make any sense I know. Can someone please take a peek at my init and add_unit files and see if there is glaring error? All the weapons that they are spawning in with they have spawned in with in the past. I have also checked all of the worldspace positions and they are all legit.
 

Attachments

  • init.sqf
    5.3 KB · Views: 8
  • add_unit_server.sqf
    13.8 KB · Views: 0
Hey guys my AI didnt spawn after adding random loot can someone please take a look
Code:
_sniperSkin = "BAF_Soldier_MTP"
_rndWeapon = floor(random 5);
switch (_rndWeapon) do {
  case 0: {_sniperRifle="M24";_sniperAmmo="5Rnd_762x51_M24";};
  case 1: {_sniperRifle="SVD_CAMO";_sniperAmmo="10Rnd_762x54_SVD";};
  case 2: {_sniperRifle="DMR";_sniperAmmo="20Rnd_762x51_DMR";};
  case 3: {_sniperRifle="M40A3";_sniperAmmo="5Rnd_762x51_M24";};
};
_sniperAmmoCount = 10;
_sniperGear = ["ItemBandage"];
_sniperWeapons = ["ItemMatchbox"];
_gunnerSkin = "BAF_Soldier_MTP";
_rndWeapon = floor(random 3);
switch (_rndWeapon) do {
  case 0: {_gunnerRifle="Mk_48_DZ";_gunnerAmmo="100Rnd_762x51_M240";};
  case 1: {_gunnerRifle="M240";_gunnerAmmo="100Rnd_762x51_M240";};
  case 2: {_gunnerRifle="M249_DZ";_gunnerAmmo="200Rnd_556x45_M249";};
};
_gunnerAmmoCount = 6;
_gunnerGear = ["ItemBandage"];
_gunnerWeapons = ["ItemMatchbox"];
_militiaSkin = "BAF_Soldier_L_MTP";
_rndWeapon = floor(random 16);
switch (_rndWeapon) do {
  case 0: {_militiaRifle="Sa58V_EP1";_militiaAmmo="30Rnd_762x39_SA58";};
  case 1: {_militiaRifle="BAF_L85A2_RIS_Holo";_militiaAmmo="30Rnd_556x45_Stanag";};
  case 2: {_militiaRifle="G36C";_militiaAmmo="30Rnd_556x45_G36";};
  case 3: {_militiaRifle="M4A1_HWS_GL_camo";_militiaAmmo="30Rnd_556x45_Stanag";};
  case 4: {_militiaRifle="M16A4_ACG";_militiaAmmo="30Rnd_556x45_Stanag";};
  case 5: {_militiaRifle="G36A_camo";_militiaAmmo="30Rnd_556x45_G36";};
  case 6: {_militiaRifle="Sa58P_EP1";_militiaAmmo="30Rnd_762x39_SA58";};
  case 7: {_militiaRifle="Sa58V_CCO_EP1";_militiaAmmo="30Rnd_762x39_SA58";};
  case 8: {_militiaRifle="AK_47_M";_militiaAmmo="30Rnd_762x39_AK47";};
  case 9: {_militiaRifle="M16A2";_militiaAmmo="30Rnd_556x45_Stanag";};
  case 10: {_militiaRifle="FN_FAL";_militiaAmmo="20Rnd_762x51_FNFAL";};
  case 11: {_militiaRifle="M4A1";_militiaAmmo="30Rnd_556x45_Stanag";};
  case 12: {_militiaRifle="M4A1_AIM_SD_camo";_militiaAmmo="30Rnd_556x45_StanagSD";};
  case 13: {_militiaRifle="G36K_camo";_militiaAmmo="30Rnd_556x45_G36";};
  case 14: {_militiaRifle="Sa58V_RCO_EP1";_militiaAmmo="30Rnd_762x39_SA58";};
  case 15: {_militiaRifle="AK_47_S";_militiaAmmo="30Rnd_762x39_AK47";};
};
_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 = 6;
        _sniperGear = ["ItemBandage"];
        _sniperWeapons = ["ItemMatchbox"];
        _gunnerSkin = "Worker1";
        _gunnerRifle = "Winchester1866";
        _gunnerAmmo = "15Rnd_W1866_Slug";
        _gunnerAmmoCount = 6;
        _gunnerGear = ["ItemBandage"];
        _gunnerWeapons = ["ItemMatchbox"];
        _militiaSkin = "Villager1";
        _militiaRifle = "huntingrifle";
        _militiaAmmo = "5x_22_LR_17_HMR";
        _militiaAmmoCount = 7;
        _militiaGear = ["ItemBandage"]; // Additional gear (does not include tools or guns)
        _militiaWeapons = ["ItemMatchbox"]; //Additional Guns and Tools
    };
};
if (_unitType == 0) then {
    _rndLOut=floor(random 2)+1;
    _unitType = _rndLout;

Or take a look
 

Attachments

  • add_unit_server.sqf
    14.6 KB · Views: 0
Anyone also having a issue when you have a friend thats hero or bandit, that once hes in a vehicle you can't get in
 
well it would seem my theory last night was wrong it wont respawn them visible again it only works on cherno but changing the true to false does make the body stay there after killed though so im sorry about that
 
What would happen if i gave AI for example a KSVK or PK? Because since hackers can get it into the game by boxes couldnt i with AI since it isnt a loot drop
you can unban the weapons in theory i have got them unbanned on my server aswel as all the vehicles and you dont need to edit the dayz_code neither unless you want to unblock some of them but i wouldnt advise that but it is pretty easy to unban them and nobody needs to download anything but your mission file
 
you can unban the weapons in theory i have got them unbanned on my server aswel as all the vehicles and you dont need to edit the dayz_code neither unless you want to unblock some of them but i wouldnt advise that but it is pretty easy to unban them and nobody needs to download anything but your mission file
I am not sure why but I have been able to add banned weapons to the loot tables, spawn them on people through the database, and have the ai spawn with banned weapons. I have no idea what I have done but it works. The only issue that I have ran into was the ammo for the VSS. It comes up with a error about no entry for the mags.
 
yes you can do that easily but the other problem you will run in to is when the player logs out and then back in that weapon will disappear as i found that out when i first did it and are you sure your using the correct ammo for it no mistyping? what class name is the vss again?
 
you can unban the weapons in theory i have got them unbanned on my server aswel as all the vehicles and you dont need to edit the dayz_code neither unless you want to unblock some of them but i wouldnt advise that but it is pretty easy to unban them and nobody needs to download anything but your mission file
Could you do a tutorial? Because i want more russian weapons i love russian weapons
 
Back
Top