Simple AI Tutorial (no rMod or DayZ_Factions)

hi can some one help me i don't know where add this on my init.sqf
Code:
zombie_generate = compile preprocessFileLineNumbers "scripts\zombie_generate.sqf";
Code:
if (isServer) then {
//
_factions = [] execVM "scripts\set_unit_faction.sqf";
//diag_log format["Factions executed: %1",_factions];
//Array to pass to .sqf: [[<worldspace>],radius of waypoints (in metres),number of waypoints,number of ai units, group type [0:random unit, 1:sniper, 2:gunner, 3:militiaman, 4:squad], faction [0:hates everyone except survivors, 1:hates everyone]]
_aispawn = [[4994.81,5114.19,0],100,5,2,4,0] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
};


startLoadingScreen ["","DayZ_loadingScreen"];
enableSaving [false, false];

dayZ_instance = 2319; //The instance
hiveInUse = true;
initialized = false;
dayz_previousID = 0;

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)

// (Taviana) Override some of the variables:
call compile preprocessFileLineNumbers "\kh\dayztaviana\init\variables.sqf";

// Load in the settings compiles:
call compile preprocessFileLineNumbers "\kh\dayztaviana\settingsinit\kh_compiles.sqf";

diag_log "Started executing user settings file.";
call compile preprocessFileLineNumbers "settings.sqf";
diag_log "Finished executing user settings file.";

progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; //Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
progressLoadingScreen 0.4;

// (Taviana) Don't call the regular compile:
// call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions

// (Taviana) Instead, call a copy of the DayZ 1.7.4.4 compiles:
call compile preprocessFileLineNumbers "\kh\dayztaviana\init\compiles.sqf"; //Compile regular functions

// (Taviana) Set up the for maule multiplayer prop hit support:
call compile preprocessFileLineNumbers "\khr\maule\scripts\maule_init.sqf";

/*
The Bliss package system works a bit like sticking your arm in a bunch
of snake nests and noticing you don't always get bitten. In this case
we got bitten; this line is to fool the merge process:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
*/

progressLoadingScreen 1.0;

player setVariable ["BIS_noCoreConversations", true];
enableRadio false;

"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";

if (isServer) then {
hiveInUse = true;
_serverMonitor = [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";
};

if (!isDedicated) then {
0 fadeSound 0;
0 cutText [(localize "STR_AUTHENTICATING"), "BLACK FADED",60];
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";

};

// Extra actions for Taviana:
if (!isDedicated) then {
[] execVM "kh_actions.sqf";
};
 
@Bazzy - Find the existing line that starts if (isServer) then { and add to that block.
Code:
if (isServer) then {
    hiveInUse = true;
    _serverMonitor = [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";
    _factions = [] execVM "scripts\set_unit_faction.sqf";
    //diag_log format["Factions executed: %1",_factions];
    //Array to pass to .sqf: [[<worldspace>],radius of waypoints (in metres),number of waypoints,number of ai units, group type [0:random unit, 1:sniper, 2:gunner, 3:militiaman, 4:squad], faction [0:hates everyone except survivors, 1:hates everyone]]
    _aispawn = [[4994.81,5114.19,0],100,5,2,4,0] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
}
 
hi can some see wot i am dung wrong i get stuck on the loading screen and some times it seas the zombie script cod not loud
 

Attachments

  • dayz_mission.pbo
    79.9 KB · Views: 5
@ Bazzy - What are you using to pack/unpack your .pbo files ? I've just downloaded yours to take a look and i can't unpack in, maybe that's why it isn't working.
When unpacking i get this error "System.Exception: It seems that it isn't ArmA pbo"

I use Pbo view 0.8 from here http://www.armaholic.com/page.php?id=1434
 
i a m using PBOManager v.1.4 beta i have packed it with pob view can u have luck at it now
 

Attachments

  • dayz_mission.pbo
    79.9 KB · Views: 4
anymore errors just let me no also if you want let me no where your last position is and i will place both sides as friendlys and put them in your area to see them
 
i am still getting the problem getting stuck on loading screen and now it seas something whet wrong
 
ok can i ask who are you running this server with dayz.st,vilayer so on? also could you upload your mission pbo before you made any changes to it what so ever the one you would have had when you first got the server
 
its just that some other scripts can make them both clash which would stall the server basically i got this problem with one of my old scripts that was in also is your server dedi or managed
 
hi my one is with dayz.st and i have not add eney thing to it this is my first time messing with it had the refuel stuff in it when i downloaded it from the server the is the original that i got taviana is the map i am attempting to get it to run on
 

Attachments

  • dayz_mission.pbo
    49.4 KB · Views: 1
hi my one is with dayz.st and i have not add eney thing to it this is my first time messing with it had the refuel stuff in it when i downloaded it from the server the is the original that i got taviana is the map i am attempting to get it to run on
ok well give this one a try and let me no as the stuff they have added into your init file i just cant wrap my head around right now but try this new one and let me no dont forget to copy it over your old files but ALWAYS MAKE BACKUPS
 

Attachments

  • dayz_mission.pbo
    79.9 KB · Views: 7
it still doing the same thing im going to contact dayz.st to if the got any ides it has done me head in so i am gong to leave it for a cupel of days tx for the help duded
 
Thanks again Scottieo, awesome! Have you figured out how to get the unlimited Ammo working for the AI yet? I would love to see a code snippet for that, thats really the last thing I need.
 
I am working on that one now but if someone else finds a way to get it working fully please upload it I'm also putting in axemans script so that you can get the AI into your own little group so to say
 
Is there a way to set them up to hate all players and like zombies, but have a certain group whitelisted based off player ID? Basically I want them to protect a certain area, but I would like for admins to have free reign of the area.
 
Looking through here I saw several post in reference to giving these guys unlimited ammo but no one really explaining where I'd put that in the code? Anyone got any idea how to do that?

Also as above getting them to not shoot zeds would be helpful because as of right now some players just kind of camp the area where the spawn waiting for the patrols to run out of ammo so they can kill them.
 
Back
Top