Trying to change zombie spawns from SPAWN to CALL

Nice going, Mmmyum. I had come to a similar conclusion, just had not really delved into it as much. The odd thing is, is if I run the code from post #17 through the variable "fnc_usec_selfActions" loot does spawn and Joikd's zombie code and player "shield" area work great - however my players loose all of their other selfActions such as harvesting meat and assessing the damage to vehicles. I had tried to build all of the self action code into the zombie spawn code in this thread, and it did not work.

I also tried a completely custom mod - i.e. I implemented Joikd's code into the DayZ Code itself, rather than as an override in the mission PBO, and it still prevented loot from spawning. I see what you are hinting at though, and it would be very exciting if we could get it functioning.
 
@Mmmyum or whomever else is interested -

I have figured out how to run Joikd's code from post #17 without adding in the stock loot spawning code from the vanilla player_spawnCheck.sqf. I ran it successfully through

Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "fixes\player_spawnCheck.sqf";

from within an if (!isDedicated) then { statement in the server mission .pbo init.sqf. To get around the issue of the loss of player self actions, I merged fn_selfActions.sqf with Joikd's player_spawnCheck.sqf.

This works great. With zombies being called instead of spawned, I am running around 300 zeds max per area without much of a slowdown.
 
Is there a how to do step by step for this script?

To get the code working in the two .sqf files in post #17 of this thread, do the following. Disclaimer: I am certain that there is a more efficient method to do this, however I freely admit that I am deep in the learning phase, versus the actual coding one. Use this at your own risk:

1. Using Joikd's code from post #17, and Notepad++ create two new .sqf files. Name the first player_spawnCheck.sqf and paste Joikd's player_spawnCheck code from that post into it. Save it into your server mission .pbo /fixes folder. Name second building_spawnZombies.sqf and paste his code into it and save it in the same folder.

2. Now open up the DayZ Code .pbo for the DayZ mod you are running which is found in your Arma2OA folder on your computer. Navigate to the compiles folder and find fn_selfActions.sqf. Open that file and copy everything. Open the player_spawnCheck.sqf you just created, and find this line at the very end and make it look like this:

Code:
} forEach _nearby;

All you are doing is adding a semicolon after _nearby so no big deal.

3. Now skip a few lines after _nearby; and pase the ENTIRE fn_selfActions.sqf into your player_spawnCheck.sqf. Save the file.

4. Open your server mission .pbo init.sqf and around the bottom of the file you will find an if (!isDedicated) then { statement. Place the following WITHIN that statement so it looks like this:

Code:
if (!isDedicated) then {
fnc_usec_selfActions = compile preprocessFileLineNumbers "fixes\player_spawnCheck.sqf";
    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";
   
 
};

**All you're adding is the part that begins with fnc_usec

5. Next find this line in your server mission init.sqf:

Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";                //Compile regular functions
progressLoadingScreen 1.0;

make that look like this:

Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";                //Compile regular functions
building_spawnZombies = compile preprocessFileLineNumbers "fixes\building_spawnZombies.sqf";
progressLoadingScreen 1.0;

6. Save your init.sqf, repack your mission .pbo and you are finished.

**for those who have already moved your fn_selfActions.sqf to your server mission folder, I don't know if you will be able to do this without breaking other scripts that require that. Sorry.
 
Saethkept - thanks for the how-to for post #17. Do you know how to do the same with the code in post #18? Specifically the zombe_generate.sqf? Do I just place that in the fixes folder as well?
 
For the zombie_generate from post #18, you would simply paste it into a new Notepad++ document, and then save it as zombie_generate.sqf in your server mission fixes folder or wherever you keep your addon's/fixes and then initiate it in your init.sqf like so:

Code:
zombie_generate = zombie_generate = compile preprocessFileLineNumbers "fixes\zombie_generate.sqf";

Beneath the //compile regular functions line.
 
For the zombie_generate from post #18, you would simply paste it into a new Notepad++ document, and then save it as zombie_generate.sqf in your server mission fixes folder or wherever you keep your addon's/fixes and then initiate it in your init.sqf like so:

Code:
zombie_generate = zombie_generate = compile preprocessFileLineNumbers "fixes\zombie_generate.sqf";

Beneath the //compile regular functions line.
Brilliant! Thanks.
 
Back
Top