Basic Setup - RaynorD/cav_ranges GitHub Wiki

This mission maker's guide will take you through the process of setting up a range using cav_ranges. There are a lot of details and options but the whole process is actually pretty short. You may be creating the range itself right now, or have a range already in use by your group that you would like the framework to control.

This guide will assume you know how to place and name objects in the Eden Editor and how to access init.sqf.

The Core Steps

There are essentially only four things you need to do:

  • Add a line to description.ext
  • Place the targets and support objects in the editor to your liking
  • Name the objects using the standard formats
  • Add a createRange function call to init.sqf

After that, the framework does the rest.

If you have multiple ranges, you would repeat the process (minus description.ext) for each range.

Description.ext

We need to add a line to description.ext to tell Arma where the framework's code is. Description.ext goes in the mission folder root. You can open a mission's folder from the editor itself: go to the very top left, hit Scenario > Open Scenario Folder, and a windows file explorer will open outside Arma. If you don't see description.ext in your mission folder, just create it. Make sure the extension is really .ext, basic text editors will try to save it as description.ext.txt.

Next, copy and paste the following code into it:

class cfgFunctions
{
    #include "cav_ranges\cfgFunctions.hpp"
};

NOTE: You can only have one cfgFunctions in description.ext. If you already have one, just add #include "cav_ranges\cfgFunctions.hpp" within that block. Do NOT create a second cfgFunctions, as this will cause an error.

Basic Mission Setup

I'll quickly list the objects you need to have placed, but they'll be discussed in detail later.

  1. An object to act as the range's "brain", can be anything. Optionally it can have actions to control the range.
  2. A trigger encompassing all shooting and observing areas.
  3. An object directly at each lane's shooting position, like a hidden helper sphere.
  4. Your targets.
  5. Optionally some loudspeakers if you want some sounds.

Just drop those anywhere in the mission for now and keep them in mind, we'll come back to them later.

Once this setup is done, you're ready for the next section.