Arma 3
Zombies and Demons
Tron- Aug 12, 2019 @ 12:00am
Zombies & Demons - Editor Tips & Tricks
Hi all,

After using Z&D in the editor for a while, I have occasionally run into niche situations which are not directly supported by the modules, and instead require other tricks (or just scripting) to get working.

An example of this is the spawner, which I sometimes want to turn on with a trigger, instead of with a timer or a 'present' sensor. I've read about a work-around for this - place the spawner on a far corner of the map, then using setPos to move it into place with a 'present' sensor once I need it (I haven't had a chance to test this yet though. Source).

I thought it would be useful to start a thread to collect all of these tips & tricks into one place. Additionally, if there is a link to a scripting reference (eg. with ways to call Z&D in triggers to change Z&D settings like movement speed or detection range mid-game?), that would be really useful, too!
< >
Showing 1-2 of 2 comments
Tron- Aug 12, 2019 @ 12:16am 
A few other tips & tricks (plus some requests for info):

Spawner Limits:
The spawner module has three limiters - "total in horde", "totat alive" and "total spawned". If any of these limits are hit, the spawner stops spawning zombies. If the "total spawned" limit is reached, the spawner is deactivated permanently.

While the "total alive" initially seems the best one to use, I've had good results using spawners with low "total spawned" limits. By controlling the spawn time of each zombie, I can anticipate the total length of time the spawner will remain active, and then set a new spawner to turn on elsewhere at that time. This allows me to change the location that zombies spawn from over time, without having a break in the spawning.

Dead Body Removal:
Whilst not a Z&D command, this is directly relevant to Z&D, as performance can be affected over time by the huge number of dead bodies which can build up. The following code snippet can help with this by deleting all dead bodies:

{deleteVehicle _x; } forEach allDeadMen;

I use this in a timed trigger to run throughout missions to keep FPS from dropping towards the end of large 'last stand' style scenarios.

To get us going, I woud like to populate the following subject headers with more information

Zombie Waypoints:
EDIT: updated below

Zombie Settings:
- Can these settings be changed mid-game?

Zombie Spawner 'isPresent' Activation Radius:
- this says "radius", but does this relate to the same distance as set on a trigger? or is it half (as it's radius vs diameter?) I may be over-thinking this.
- Is there a way to set them to spawn using a trigger or boolean/variable condition?

Zombie Deletion:
- Is there a way of deleting zombies which are stuck - eg. not moving or unable to reach a specific waypoint?

Last edited by Tron-; Aug 15, 2019 @ 2:11pm
Tron- Aug 15, 2019 @ 2:11pm 
After doing a bit of testing, I've found out a little more about how waypoints work. I managed to get a horde of zombies to run around a field, following a waypoint object quite nicely.

Zombie Waypoints:
Using the "Zombie Waypoint" module seems a bit simplistic - they work just fine if only one is placed, but if more than one waypoint module is placed, Zombies seem to move towards a randomly chosen waypoint, rather than the nearest one to any given zombie. To confirm - it doesn't seem to matter if one waypoint is closer than another for the purpose of determining which waypoint module a Zombie uses.

I've not had much luck moving the modules in the middle of a game, either. If you're trying to change the point zombies walk towards, I've had some luck using the code below with a trigger with OPFOR/Present activation:

{zwp1Pos = [(getposATL zwp1 select 0) + random 30 - random 30, (getposATL zwp1 select 1) + random 30 - random 30, getposATL zwp1 select 2]; _x domove zwp1Pos} foreach thisList;

In the code above, all zombies in a given trigger area will move towards a point specified with an object named "zwp1". If you move the object zwp1 (or change the variable zwp1), and re-run the code above, then all of the zombies in the triggered area will move again. Changing the number "30" in the code above will affect how grouped up the zombies are - larger numbers result in a greater spread.
< >
Showing 1-2 of 2 comments
Per page: 1530 50