Forum Jump :

Author Message


Posts: 3
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: -

 
#1 Posted at 2014-02-14 18:02        
     
This is my simple zombie AI Shaun. You can use it with any infantry unit, but make sure that they are not allied to your faction (you can change this via setFriend). To make an AI unit a zombie simple put

null = [this] execVM "shaun.sqf";

in the init of the unit.

Note that this is at a very early stage and still is buggy. I tried to keep performance in mind but can't guarantee anything, this is the first time I'm programming something this big for Arma.

Here is a video with me playing against the current version:
http://www.youtube.com/watch?v=oLDsikSsWEU

Feel free to report any bugs or make any suggestions in this thread! Please also read the Readme.txt.

Download


The way the zombies work:
The zombies can spot a player that is standing from 100m, less when he is crouching or proning and even less when there is fog. Zombies can see perfectly fine at nighttime though. Zombies cannot see a player if he is behind it (their FOV is less than 180°), but they can smell him if he gets closer than 20m. The zombie will then start attacking the player until the player or the zombie dies - losing a zombie is not possible.

Planned features:
-Adding movement while idle
-Adding idle sounds
-Adding aggro sounds

Known bugs:
-Zombies can punch through walls and objects

This post was edited by BlueBär (2014-02-15 18:05, ago)


Author Message


Posts: 20255
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#2 Posted at 2014-02-14 22:39        
     
Thanks for posting the release here :-)
News is up on the frontpage and you can find our mirror here:



Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 3
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name: -

 
#3 Posted at 2014-02-15 18:09        
     
I updated the download link in my post, there have been no actual code changes but I included an old readme file with had some false information. I don't know if there is a way for me to edit the download page, can an admin or mod change
[this] execVM "zombieai.sqf";
to
null = [this] execVM "shaun.sqf";
at usage and update the download? Thanks!


Author Message


Posts: 1
Rank:


Level: Member

Country: se
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2014-04-14 20:28        
     
Thank you for your script.

Some bugs I noticed while playing around with it a bit.

The pointers (or whatsitscalled) for the sounds in the sqf files are pointing at z<sound> and not just <sound> as they are named in the included folder which will give you an error message.

The Zombies also seem to ignore you completly while in a vehicle.

And a suggestion if you plan to update it. It would be nice with some more grunting sounds while they are idling and chasing you. It´s just not as fun being chased by a gang of silent zombies, feels more like you´re just out running. =)


Author Message

Pibol  



Posts: 1
Rank:


Level: Member

Country: es
Location:
Occupation:
Age:
In-game name: pibol@hotmail.es

 
#5 Posted at 2014-05-01 13:06        
     
Thank you for your script.
I used in my mission. I put 2 lines, to put any unit. And added enableSentences false in init.sqf. I hope that you like.
Mission in Stean

Gracias por el scripts, Lo he usado en mi mision. Puse 2 lineas, para poner cualquiera unidad. y añadi enableSentences false en init.sqf, Espero que os guste.


Author Message


Posts: 22
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2014-06-16 06:18        
     
Hey Blue,

With a few minor tweaks, this script is working great! The tweaks I made are:

1) Needed to rename all the sound files to add a 'z' in front of them. Also need to update the description.ext entries to load the new file names (with z's).
3) I changed the line checking for the zombies side in shaun.sqf from "//if ((side _zombie) getFriend (side _x) < 0.5) then {" to "if (_x in playableUnits) then {" Then you don't need to worry about any sides or anything, the zombies will only go after players.

I do have two quick questions though.

1) Is there any way that you know of that you can change the zombie's skin tone to grey or something else through the script so you can tell at a distance that there is something wrong with the unit.
2) Any way the script could be tweaked to have the zombies move around randomly when a player is in range to see them, but before the zombie charges at them?

Thanks for the great script!


Author Message


Posts: 3
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2014-10-19 21:50        
     
I have been trying to get this to work without placing any physical units in the editor. I am trying to use markers, triggers and a scripts. Also using the spawn group fnc. Any ideas or help would be appreciated. Thanks.


Author Message


Posts: 69
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 23
In-game name: Mr. Ryan

 
#8 Posted at 2014-10-20 14:27        
     
How far have you got so far? Also if you're not placing any units in the editor you need to use the createCenter command. :-)

If I've helped you out, or you like my missions, consider donating, however small :-) PayPal Donations. Or check out My Wordpress Site for my content!

Author Message

CyDoN  



Posts: 22
Rank:


Level: Member

Country: gr
Location:
Occupation:
Age: 30
In-game name: CyDoN

 
#9 Posted at 2014-11-08 01:13        
     
any chance for mod version with modules and anims?


Author Message


Posts: 3
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#10 Posted at 2014-11-09 04:58        
     
# Spencer42 : How far have you got so far? Also if you're not placing any units in the editor you need to use the createCenter command. :-)
i tried adding this to my script but to no avail. I'm sure it's due to the fact i'm unsure of what variable to use. I tried using the default one straight from the wiki along with others but none seem to work.
private ["_spawnmrk","_wp1", "_i","_chkgroup","_SideHQ","_this"];

//if ({alive _x} count units Chkgrp1 == 0) then {
for [{_i=0}, {_i<3}, {_i=_i+1}] do {
n1 = round((random 5) + 0.5);
if (n1 == 1) then
	{
		_spawnmrk = (_this select 0);
	};
if (n1 == 2) then
	{
		_spawnmrk = (_this select 1);
	};
if (n1 == 3) then
	{
		_spawnmrk = (_this select 2);
	};
if (n1 == 4) then
	{
		_spawnmrk = (_this select 3);
	};
if (n1 == 5) then
	{
		_spawnmrk = (_this select 4);
	};
Chkgrp1 = [getMarkerPos _spawnmrk, EAST, (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_InfTeam")] call BIS_fnc_spawnGroup;

_wp1 = Chkgrp1 addwaypoint [getMarkerPos "wp1", 500];
_wp1 setWaypointCombatMode "RED";
_wp1 setWaypointtype "SAD";
//_SideHQ = createCenter east
//null = [Chkgrp1] execVM "shaun.sqf";

};
That is my spawning script
_sideHQ = createCenter east;
{ _x removeAllAssignedItems} foreach units (This select 0);
{ _x removeGoggles} foreach units (This select 0);
{_x removeHeadgear} foreach units (This select 0);
{ _x removeVest} foreach units (This select 0);
{ _x removeBackpack} foreach units (This select 0);
{ _x removeAllWeapons} foreach units (This select 0);
null = [this] execVM "shaun.sqf";
this is the script i am trying to use to turn said group into a group of zombies


Author Message


Posts: 1
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name:

 
#11 Posted at 2014-12-31 14:36        
     
Where do you place the sounds? Everytime I shoot a zombie or they attack 'missing sound' I put them in the addons folder, in the mission folder, in the game folder. Same issue.


Author Message


Posts: 1
Rank:


Level: Member

Country: fr
Location:
Occupation: Electronics engineering
Age: 35
In-game name:

 
#12 Posted at 2015-09-14 17:35        
     
Hello guys,

I'm aware that digging up an old thread is against the Armaholic's rules but I had to report to the community something I freshly discovered about this script.

I was playing with Shaun in Arma's editor and many times I was aggroed by a zombie with the feeling that it wasn't possible he saw me. From that point, I made a little script that uses BlueBär's method to evaluate if the player stands in the zombie's FOV. From my experience with Shaun, I wasn't really surprised to discover that zombies can see you when your are behind them. It only happens when the AI is oriented at certains azimuts like 90° and 270° (only tested 0,90,180,270) but it is really annoying.

Here is a test mission so anybody can test it and experience the OP zombie : DL link

The only script provided with the mission contains a workaround that seems to work well. To test my method just comment #define SHAUN and uncomment #define BASSTARD.

Hope this could help anybody !

EDIT: There was a mistake in the script, the working version is uploaded and the DL link is updated.

This post was edited by basstard (2015-09-14 19:30, 768 days ago)

while (!(succeed = try()));





Tags: Ai, Zombie