Jump to content
gulozwood

Infected Script by Gulozwood

Recommended Posts

Hi all,

I need some help with BIS_fnc_MP.

I call the Infected Script from my Spawn Script in mission Init.sqf. The Spawn Script place some marker and the trigger on the map.

I have a mission that works fine with this (it spawn 100 units)

_dt5 setTriggerStatements ["this", "null= [thistrigger,[""Warnung_Sperrgebiet1""], 100, false, false] spawn INF_fnc_infectedzone; ", ""];

But now i need to start it with my Headless Client. The Headless Client works fine and spawn other Units from Scripts without problems. I try it with many different ways, but my Headless Client didn't spawn from INF_fnc_infectedzone.

Maybe i have to chance something inside the Infected Script.

But i think, i need to spawn it with BIS_fnc_MP.

I anybody familiar with setTriggerStatements and BIS_fnc_MP?

thx so much

Share this post


Link to post
Share on other sites

I tried a few things on my EpochMod server and successfully created a new WAI mission based on the system I found here. Thanks very much!

However, I still cannot re-skin my zombies to look like zombies. I tried using:

_chosenFace = ["infected2","infected1","zombi","zomboy"] call BIS_fnc_selectRandom;

_me setFace _chosenFace;

[[_me,_chosenFace], "setZomboyFace"] call BIS_fnc_MP;

on the server-side to call:

setZomboyFace =

{

private["_me","_face"];

_me = _this select 0;

_face = _this select 1;

_me setFace _face;

enablesentences false;

_me setObjectMaterial [0, "A3\Characters_F\Common\Data\basicbody_injury.rvmat"];

hintSilent "setting zombi face";

};

on the client mission side but it doesn't work. I think BIS_fnc_MP is overwritten by EpochMod (or infiSTAR antihack).

I also tried setting new Identities via description.ext:

class CfgIdentities

{

class Zombie1

{

name = "Zombi 1";

face="zomboy";

glasses = "None";

speaker = "Male01ENG";

pitch = 1.1;

};

class Zombie2

{

name = "Zombi 2";

face="zombi";

glasses = "None";

speaker = "Male01ENG";

pitch = 1.1;

};

class Zombie3

{

name = "Zombi 3";

face="infected2";

glasses = "None";

speaker = "Male01ENG";

pitch = 1.1;

};

class Zombie4

{

name = "Zombi 4";

face="infected1";

glasses = "None";

speaker = "Male01ENG";

pitch = 1.1;

};

};

with this code:

_identity = ["Zombie1","Zombie2","Zombie3","Zombie4"] call BIS_fnc_selectRandom;

_me setIdentity _identity;

it doesn't work either.

Note that when I create new unit in editor and do:

_this setFace "zombi";

it works great

So I currently put:

_me addHeadgear "wolf_mask_epoch";

on all my zombies in the mission and go with the Werewolf/Toxic Experiment story.

Anyone has a clue on how to make this work?

Thanks in advance!

Share this post


Link to post
Share on other sites

Hello guy's.. I think Gulozwood is inactive for a long time so this is for anyone who is fimilier with scripting. Recently i wanted to create a servival coop mission and almost finished making it using dawn of the dead mod for texture and Infected script but i encountered a strange problem. I realized that when ever i click on the map while in preview mode in editor, the game teleports me to that location. I thought it could be because of the editor i checked this on multiplayer and my friend could also teleport when he clicked on the map. I tried the script by disabling all the mods and running it with base game still no luck. My friend tried it on his pc and he also faced the same problem, I'm noob when it comes to scripting so can anyone plz download and check this script or maybe suggest a fix.

Edit.

Thanks to F2kSel prolem is solved, In the init.sqf file change this line

["click", "onMapSingleClick", { player setPos _pos; }] call BIS_fnc_addStackedEventHandler;

to

// ["click", "onMapSingleClick", { player setPos _pos; }] call BIS_fnc_addStackedEventHandler;

Edited by WAR34D

Share this post


Link to post
Share on other sites

I was able to put zombie faces to work by adding to fn_spawner.sqf:

....

_object = infectedattacker createUnit ["O_soldier_F",_buildingPos, [], 1, "PRIVATE"];

[_object,_myZone] spawn INF_fnc_infectedinit;

};

_infectedCount= _infectedCount + 1;

missionNamespace setVariable ["infected", _object];

publicVariable "infected";

sleep 0.3

please note I updated my createUnit command from the original version

Next, on the client side you will need to add to init.sqf

[] execVM "custom\remote.sqf";

and custom\remote.sqf

if(!isDedicated) then {

setZomboyFace =

{

_me = _this;

_chosenFace = ["zombi","zomboy"] call BIS_fnc_selectRandom;

//diag_log format["_me=%1",_me];

_me setFace _chosenFace;

_mimic = ["dead","danger","hurt"] call BIS_fnc_selectRandom;

_me setMimic _mimic;

enablesentences false;

_me setObjectMaterial [0, "A3\Characters_F\Common\Data\basicbody_injury.rvmat"];

};

"infected" addPublicVariableEventHandler {(_this select 1) call setZomboyFace;};

};

Edited by shurix

Share this post


Link to post
Share on other sites

Hello , How to launch the script in my server ?

Because the Zombie is no move and no pop in area zone ?

Share this post


Link to post
Share on other sites

hey guys, checking in on this script. Does it still do what its suppose to do? I am thinking about scripting a side mission to clear some zombies.

My question is will the call line work in this fashion? I will do some tests but wanted to see here 1st if anyone else has used it this way or if I need to do something else. Thanks!

//civilian zombies
_grp1 = [(_marker), EAST,[
"C_man_1","C_man_polo_1_F","C_man_polo_3_F","C_man_polo_4_F","C_man_polo_5_F","C_man_polo_6_F",
"C_man_p_fugitive_F","C_man_p_beggar_F","C_man_w_worker_F","C_man_hunter_1_F","C_scientist_F",
"C_man_p_shorts_1_F","C_man_shorts_1_F","C_man_shorts_2_F","C_man_shorts_3_F_euro","C_man_shorts_4_F_afro",
"C_journalist_F","C_Marshal_F","i_g_survivor_F","o_g_survivor_F","C_man_polo_1_F_afro"
],[],[],[],[],[],random (360)] call bis_fnc_spawngroup;
null = this spawn INF_fnc_infecthim;

Also, the folder has a bunch of stuff in it, I am not using the trigger aspect of this script, only want it to be used on these units, If I am reading correctly, I only need description.ext files and unit call line. Correct?

Edited by JAndrews1

Share this post


Link to post
Share on other sites

From Schrubbdiwupp:

What can i do that the script works in Epoch??

The question that I'd prefer to have answered is, "How to get Epoch monsters into Arma 3's regular Editor?" For a variety of reasons, multiplayer is a game type that I rarely play. In the end, multiplayer communities vanish over time, and frequently at a rapid pace. I dearly wish that the great zombies from Breaking Point and the creatures from Epoch were readily available for easy use for single-player modding in the default Editor. It took me nearly an hour and a half to follow asuseroako's instructions to get Breaking Point's zombies working in the regular Editor http://voicecommands.blogspot.com/2014/10/arma-3-breaking-point-zombies.html, but even then, doing so makes the game very unstable, as one is "locked" into an Editing mode that seems hardwired towards just the zombie based mission that Gulozwood wrote. For me, it's impossible to simply merge Gulozwood's/asuseroako's coding to a different island within the Editor. One has to, instead, rename the mission so that it ends with the island's name, but then the trigger points spawn zombies in areas where they're not desired. And that's just the start of the headaches... :(

Don't get me wrong, I am VERY grateful that asuseroako released what he did to enable Breaking Point's zombies in single-player (THANK YOU asuseroako!). I just wish such huge hurdles weren't required to make it happen at all.

.

.

.

Badly Desired: A script that causes the infected/zombies to be drawn towards flares, explosions and lengthy persistent smoke trails...

I'm completely confident that this would be a VERY cool effect in a zombie infested world. If it's dark enough, whenever a flare is fired into the sky, any zombie within 400 m. of the flare would be drawn to it, and would start walking to it. If they see any living targets on the way, zombies would run towards to the target in an effort to eat them. Zombies would keep walking towards where the flare was last seen for another 2 minutes after the flare completely dies out, at which point the zombies then linger. A smart person could fire several flares over a region occupied by human enemies, and the zombies could be "lead" from a safe distance to one's targets. Of course, using the flare might not be so "safe" if there were zombies BEHIND the flare shooter's position!

Ideally, I think it would be smart to write the code in such a way that even if infected spawn points weren't within range of seeing the flare, that a random amount of infected would be spawned (where the player couldn't see them pop into existence), perhaps a minimum of five zombies to a maximum of 30, and that these zombies would come walking in from a multiple random directions and distances (direction and distance would be randomly assigned to every cluster of 5 infected). This would keep the player on his toes, because a cluster or two of zombies could be spawned behind him.

If I remember correctly, Gulozwood already wrote the script so that the infected are drawn by the sound of gunfire, but how much more so should it be for exploding 40 mm, frag hand grenades, and flash bangs? Again, theoretically, throwing a chain of these noisy explosives towards an area that's occupied by human enemies could draw the infected to the noisy area so that they'll then attack the humans they find there.

Trails of lengthy and persistent smoke could also be beacons to the infected. If they're within 500 m., they'll move to the area to investigate.

And finally, imagine that after clearing a region of human opponents, that badly needed supply caches are dropped by air, and shortly after the small cache of supplies land on the ground, red smoke begins to trail upward from the newly landed cache, and attached flares also alight? What a torturous target for the player! Now they have to move to the smoking and bright supply cache knowing full well that zombies would be attracted to the location as well.

Talk about tension! :bounce3:

Share this post


Link to post
Share on other sites

does this script work? Am trying it now and getting errors. cant find files and crap

Share this post


Link to post
Share on other sites

Hi all.

I try the infected attack independent and blufor, but not work,any idea?

Share this post


Link to post
Share on other sites

solved

Edited by JAndrews1

Share this post


Link to post
Share on other sites
getting error.

6:36:28 Warning Message: Script functions\CfgFunctions\fn_INFECTED.sqf not found

I have already moved this file in to the functions\cfgfunctions folder... when unpacked mission the file is outside the folder with init.sqf files. not sure why its not finding it. Any help?

Can anyone let me know if this script is working?

Yes, work fine for me, try download again the last version.

Share this post


Link to post
Share on other sites

Could anyone post a quick mission for this script that works plz? I am trying to just use the unit code for each not the trigger. Thanks!

Share this post


Link to post
Share on other sites

solved

Edited by JAndrews1

Share this post


Link to post
Share on other sites
spawn rate is based on the house count in the marker zone, from 10% to 70%.

70% if you have 10 houses or less in the marker, 10% if you have more than 100 houses.

these probabilities are used for every "buildingPos" of houses in the marker.

in Aegia Marina filled at 10% I can get from 30 to 70 spawned units ... :/

you can find _probability in the popinfected.sqf file at line 19.

here a little test with 300 spawned, still working in coop

is there any variable that can be output to give a live count for the zombies to perhaps start another horde?

Share this post


Link to post
Share on other sites
My main problem is i am getting this dumb error and dont know how to fix it.

16:58:34 Warning Message: Script Infected\functions not found

I know what its telling me. BUT I have the files set up the same way as the example. the only thing i left out was his debug stuff. everything else is fine.

here is the des.ext.

#include "infected\infectedsounds.hpp"
#include "f\spect\config.hpp"

class CfgFunctions
{
#include "infected\cfgfunctions.hpp"
#include "JSHK_Redress\cfgfunctions.hpp"
#include "f\spect\functions.hpp"
};

I have all files in right place and still cant get past that error. Have switched to using his zones b/c thats all that was in his example mission.

His mission example works fine. AND of course he is missing in action to ask.

Any suggestions?

Does it work if you use the downloaded mission as is? are you playing as Opfor, when i tried playing as Opfor it didnt work.

Other than that the default download mission works no problem so you will need to go back to the drawing board.

Share this post


Link to post
Share on other sites

Altis thanks for pointing that out. The files are set up originally for east. So I went back and changed everything east to Independent. So that shouldn't be an issue anymore. But it still doesn't change the error i get with the files not being found. that makes no sense to me. no matter the side it should find the files initially then if east not changed not work:). but....

---------- Post added at 16:23 ---------- Previous post was at 15:58 ----------

Thanks to ----> Cruoriss

After combing in to the thread this is what it is... not sure why its not changed for the example mission. BUT whatever! change the cfgfunctions.hpp file to the below!

 class INFECTED
   {
   tag = "INF";
   class functions
   {
   file = "Infected\functions";
   class attack {};
   class attacker {};
   class contact {};
   class nearesttarget {};
   class nextSound {};
   class roaming {};
   class stuff {};
   class vehicle {};
   class infectedinit {};
   class spawner {};
   class roam {};
   class infectedzone {};
   class playerLeavingZone {};
   class inithordeattacker {};
   class inithorde {};
   class Edattack {};
   class infecthim {};
   class Ednearesttarget {};
   class Edroam {};
   class infinit{};
   class autopop {};
   };
   };

Calling cfgfunctions multiple times breaks the mission .

Lastly, there should be a way to set this up where civilian is zombies and they attack all factions.... well where 1 faction is zombies and attacks the other 3. Should be. I am looking through these files and dont see anywhere that its defined. Anyone?

Edited by JAndrews1

Share this post


Link to post
Share on other sites

For those interested in this script.... see above post too.

I have changed some behaviors that help a little with path finding and behaviors. again it depends on your style of zombie. I like the ones more aggressive.

In the file fn inithordeattacker i changed/added the below. nothing crazy but i like them better this way. they still get stuck and thats b/c disableAI "FSM".

private ["_me","_myzone","_initialPos"];
if(isserver)then{
_me=(_this select 0)select 0;
_myzone=_this select 1;
_initialPos=getPos _me;
infectedCount = infectedCount + 1;
_me disableAI "FSM";
//_me disableAI "AUTOTARGET";
//_me disableAI "TARGET";
_me setBehaviour "AWARE";
_me enableFatigue false;
_me setVariable ["BIS_noCoreConversations", true];
[_me] spawn INF_fnc_Stuff;
_me addEventHandler ["HandleDamage",
{
   _damages = _this select 2;
   if (((_this select 1) in ["head"])and (_damages >= 0.8)) then
   {
       (_this select 0) setDamage 1;
   }else{
       (_this select 0) setDamage 0;
   };
}];  
_me addEventHandler ["hit",{
	[[_this select 0,"hurt"], "INF_fnc_NextSound"] call BIS_fnc_MP;
	(_this select 0) lookAt (_this select 1);
	//missionNamespace setVariable [format ["%1_nextTarget",_this select 0], _this select 1];
}];
[_me,_myzone,_initialPos] spawn INF_fnc_Attacker;
};

Not too sure what has happened to the face's but will try some things. I changed all files like the above that defines the zombies behaviors to these. with testing seems better.

---------- Post added at 21:57 ---------- Previous post was at 21:30 ----------

spawn rate is based on the house count in the marker zone, from 10% to 70%.

70% if you have 10 houses or less in the marker, 10% if you have more than 100 houses.

these probabilities are used for every "buildingPos" of houses in the marker.

in Aegia Marina filled at 10% I can get from 30 to 70 spawned units ... :/

you can find _probability in the popinfected.sqf file at line 19.

here a little test with 300 spawned, still working in coop

is there any variable that can be output to give a live count for the zombies to perhaps start another horde?

I suppose since its Opfor. you could use a trigger for the zone,

condition : east countSide thislist <= 5

Act: drop in another horde code.

Share this post


Link to post
Share on other sites

is there any way for the horde to be started from a script on a lan multiplayer server, with the amount of zombies spawned scaling up as the waves are killed?

Share this post


Link to post
Share on other sites
is there any way for the horde to be started from a script on a lan multiplayer server, with the amount of zombies spawned scaling up as the waves are killed?

triggers with the existing code. lots and lots of triggers.... depending on how many waves and zombies you want.

Share this post


Link to post
Share on other sites

I know gulozwood has been gone for some time. I doubt he would care if anyone interested in making this script work and fix it was able to do so and release it back to the community. It seems he has done all the hard work. Its just not easy to follow to use nor are his face skin addons easy to use. matter of fact... no directions on how to use them for people like me with hardly any coding background.

Share this post


Link to post
Share on other sites

hello ! any idea on how to run this script on a dedicated server ? No zombies are spawning in my spawn points (trigger+marker). I've found something in the infected.sqf about dedicated servers (T_Server, T_Client ...) and I tried a few things but nothing is working :confused:

FYI I can create some units from the editor with "null = this spawn INF_fnc_infecthim" and they are attacking us corrctly.

Any help would be appreciated !

Edit : Solved ! thanks !

Edited by AlexIsTheOne
Fixed

Share this post


Link to post
Share on other sites

Can anyone help me?

I dont know what i have to setup for my Battleeye Filters to get the script work.

Everytime a player enters the trigger area, he gets kicked for Battleye script restriction #33.

Share this post


Link to post
Share on other sites
hi, i've tested this and it seems to work.

first in the infected.sqf file at line 68 find:

PHP Code:

_x setTriggerActivation ["west", "PRESENT", true];

and replace with:

PHP Code:

_x setTriggerActivation ["any", "PRESENT", true];

then in the infected\zoneinit.sqf file at line 16:

PHP Code:

if (alive _x ) then

and replace with:

PHP Code:

if ((alive _x

This thred dosnt work i have test it and the Infections dont attack Civillian players....

I want tat Infections only attack players.

I realy want help :/

Pasi

Share this post


Link to post
Share on other sites

For those who use this script, I have identified a flaw in Shaun AI script (used for zombie AI in infected script) that leads to zombies being able to see you from behind.
 
I've isolated the code from fnc_contact that test if the player is in zombie's FOV. From this, I've made a little mission in VR so anybody who want to check this out can easily experience this f*cked up behaviour. FYI, it only happens at certain azimuts (90 and 270, maybe at a broader range but only tested 0,90,180 and 270).
 
Test mission download link

 

Bonus: my script contains an implementation that seems to work well from my preliminary testings. IDK if it's 100% fail-proof but at least, it works better. To test it directly from the VR mission, simply comment #define SHAUN and uncomment #define BASSTARD and reload the mission.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×