Arma 3
Zombies and Demons
CaptainMittens 21. sep. 2015 kl. 13:21
Zombience.sqf




// hint "0";
_i = [] spawn {


_maxZombies = 5;
_distance = 50;
_addMed =1;

_ZombiesSlow= ["RyanZombieC_man_1SlowOpfor","RyanZombieC_man_polo_1_FSlowOpfor","RyanZombieC_man_pilot_FSlowOpfor","RyanZombieC_journalist_FSlowOpfor","RyanZombieC_OrestesSlowOpfor","RyanZombieC_NikosSlowOpfor","RyanZombieC_man_polo_2_FSlowOpfor","RyanZombieC_man_polo_4_FSlowOpfor","RyanZombieC_man_polo_5_FSlowOpfor","RyanZombieC_man_polo_6_FSlowOpfor","RyanZombieC_man_p_fugitive_FSlowOpfor","RyanZombieC_man_w_worker_FSlowOpfor","RyanZombieC_scientist_FSlowOpfor","RyanZombieC_man_hunter_1_FSlowOpfor"];
_ZombiesFast = ["RyanZombieC_man_1MediumOpfor","RyanZombieC_man_polo_1_FMediumOpfor","RyanZombieC_man_pilot_FMediumOpfor","RyanZombieC_journalist_FMediumOpfor","RyanZombieC_OrestesMediumOpfor","RyanZombieC_NikosMediumOpfor","RyanZombieC_man_polo_2_FMediumOpfor","RyanZombieC_man_polo_4_FMediumOpfor","RyanZombieC_man_polo_5_FMediumOpfor","RyanZombieC_man_polo_6_FMediumOpfor","RyanZombieC_man_p_fugitive_FMediumOpfor","RyanZombieC_man_w_worker_FMediumOpfor","RyanZombieC_scientist_FMediumOpfor","RyanZombieC_man_hunter_1_FMediumOpfor"];
_sZedsNum = count _ZombiesSlow;
_mZedsNum = count _ZombiesFast;
_startTime = time;
_initialBurst = 4;
_spawnTroops = true;

// hint "1";
AttackGroup = createGroup east;
while { _spawnTroops } do
{
// hint "2";
if( count units AttackGroup < _maxZombies) then
{
// hint "3";

_fastSlow = random 3;


_ZedType = _ZombiesSlow select (floor ( random _sZedsNum ));

if ( _fastSlow > 2 and _addMed == 1) then
{
_ZedType =_ZombiesFast select (floor ( random _mZedsNum ));

};



_plusX = random 2;
if(_plusX > 1 ) then
{
_plusX = 1;
};
if(_plusX < 1) then {
_plusX = -1;
};

_plusY = random 2;
if(_plusY >1 ) then
{
_plusY = 1;
};
if(_plusY < 1) then {
_plusY = -1;
};

_posY = 50 + random _distance;
_posX = 50 + random _distance;

_posY = _posY * _plusY;
_posX = _posX * _plusX;


spawnPos = getPos Player;
spawnPos = [(spawnPos select 0) + _posX, (spawnPos select 1) + _posY, 0];
objPos = getPos Player;

// hint "4";
unit1 = AttackGroup createUnit [_ZedType, spawnPos, [], 1, "FORM"];
// hint "5";


wp = AttackGroup addWaypoint [objPos,0];
wp setWaypointSpeed "Full";
wp setWaypointType "MOVE";
wp setWaypointBehaviour "COMBAT";


};
if( !Alive player) then
{
_spawnTroops = false;
};
sleep 30;
};
};

Sidst redigeret af CaptainMittens; 3. nov. 2015 kl. 8:31
< >
Viser 1-15 af 30 kommentarer
CaptainMittens 21. sep. 2015 kl. 13:23 
Hey, if anyone has any improvements let me know. It's a light weight spawner that doesn't hit the server as hard. Also, because the clients are spawning the zeds, it causes the players to do the AI processing for the zombies, so it helps distribute some of the CPU load off of the server (sort of like mini headless clients, but with heads :D ).

The idea is it creates an ambience of a few zeds around the players at all times, a Zombience if you will :).

This it supposed to be combined with the included spawners, so they can be more like events, and this can just keep a few zeds lingering around to keep players on their toes and moving.
Sidst redigeret af CaptainMittens; 21. sep. 2015 kl. 13:25
CaptainMittens 21. sep. 2015 kl. 13:27 
If there's some more API like stuff, I'd love to be able to incorporate the crawl out of the ground spawn animation. Also, whatever happens to editor placed zombies that allows them to kill players using ACE would be dope. Right now this has the same effect as the Included spawners where spawned units sometimes can't kill ACE units.

The funny thing is, I have 1 mission where the spawned zombies can kill ACE units, but only the players, not the friendly AI. But I havn't been able to replicate it in other missions even when copying all the ACE settings. It's really frustrating.
Coul 2. nov. 2015 kl. 14:16 
This is really cool, thank you so much for this
Sidst redigeret af Coul; 2. nov. 2015 kl. 14:23
CaptainMittens 3. nov. 2015 kl. 8:30 
I just updated the OP to add the crawling out of the ground spawn animations, and tuned down the zombie presence. I tried it, and it was pretty overbearing, basically, it was replacing the zombies too fast and it would basically pin the player down.
Coul 3. nov. 2015 kl. 12:57 
sounds awesome i'll test it out now and give whatever feedback i can :steamhappy:
Coul 3. nov. 2015 kl. 12:58 
do you think its possible to make zombies side neutral because i've been playing this with escape altis and some of the enemies are independent so zombies would just ignore them
CaptainMittens 3. nov. 2015 kl. 20:06 
you can make indy friendly to opfor.
Coul 3. nov. 2015 kl. 20:07 
then zombies wouldnt attack opfor either
Coul 3. nov. 2015 kl. 20:08 
i want them to attack everyone
CaptainMittens 4. nov. 2015 kl. 9:46 
If you want Zombies to attack indy, they're going to have to be opfor zombies, and independant is going to have to be hostile to both blue and opfor.
CaptainMittens 4. nov. 2015 kl. 9:48 
If the existing enemies are Opfor, then change "AttackGroup = createGroup east;" to "AttackGroup = createGroup resistance;"
Coul 4. nov. 2015 kl. 14:25 
ah i see thanks, are the zombies opfor by default?
CaptainMittens 4. nov. 2015 kl. 14:40 
No, but the units spawned in this script use the opfor zombies _ZombiesSlow= ["RyanZombieC_man_1SlowOpfor","RyanZombieC_man_polo_1_FSlowOpfor","RyanZombieC_man_pilot_FSlowOpfor","RyanZombieC_journalist_FSlowOpfor","RyanZombieC_OrestesSlowOpfor","RyanZombieC_NikosSlowOpfor","RyanZombieC_man_polo_2_FSlowOpfor","RyanZombieC_man_polo_4_FSlowOpfor","RyanZombieC_man_polo_5_FSlowOpfor","RyanZombieC_man_polo_6_FSlowOpfor","RyanZombieC_man_p_fugitive_FSlowOpfor","RyanZombieC_man_w_worker_FSlowOpfor","RyanZombieC_scientist_FSlowOpfor","RyanZombieC_man_hunter_1_FSlowOpfor"];

That part, you'll notice the Opfor at the end of all the classes. you could replace those with the independant version of the zombie classes.

Additionally, you could just add zombie spawn modules if you're editing the map anyways.
Coul 4. nov. 2015 kl. 15:31 
ah thanks
Bungus 24. nov. 2015 kl. 17:57 
So if I paste this script into the description.ext file zombies will randomly spawn near players? or do I need to place a module in-game?
< >
Viser 1-15 af 30 kommentarer
Per side: 1530 50