/DayZHeliCrashes

DayZ mod inspired crash sites for DayZ standalone

Primary LanguageC

DayZ helicopter crash sites

DayZ mod inspired crash sites for DayZ standalone

Implementation

init.c

  1. Include CrashSite.c
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\CrashSite\\CrashSite.c"
  1. Create a member variable for the crashsite spawner.
class CustomMission : MissionServer
{
  ref CrashSite m_crashSiteSpawner;

  // ...
  1. Create the instance in the OnInit method in your implementation of MissionServer. Spawn the crash sites.
class CustomMission : MissionServer
{
	override void OnInit()
	{
    m_crashSiteSpawner = new CrashSite();
    m_crashSiteSpawner.SpawnCrashSites();
  }

  // ...
  1. Implement this to the OnUpdate method in your implementation of MissionServer.
	override void OnUpdate(float timeslice) {
		super.OnUpdate( timeslice );
		m_crashSiteSpawner.PollCrashSite();
	}
  1. Done.

Modifications

There are arrays of crash site positions and loot tables in the CrashSite.c file. You can modify those to your own liking.

Stuff you should know

  • The crash sites are not deleted on server restart, so the server might spawn new crash sites on top of the old ones. If you know a way to create objects without them being saved on restart, make a PR or let me know!