Calling createRange - RaynorD/cav_ranges GitHub Wiki

Once your mission objects are setup, all that's left is to actually make the function call. You should have your arguments ready to go from Design Your Range, so this article will serve as an example for the syntax to assist you in finalizing your function call.

4 lane, 8 target grenade range:

[
  "targets", //range type
  "Grenade Range", // title text
  "gr", // range tag
  4, // lane count
  8, // targets per lane
  [ // Range sequence
    ["Ready your grenades",5],
    ["Range is hot!",1],
    [[1],15],
    [[2,3],15],
    [[4],15],
    [[5,6],15],
    [[7,8],15],
    ["Range complete.",0]
  ],
  nil, // target grouping (not currently working)
  [8,6,5] // qualification tiers
] spawn cav_ranges_fnc_createRange;

Single lane, 4 target anti-tank range:

[
    "spawn", //range type 
    "AT Range", // title text
    "r6", // range tag
    1, // lane count
    4, // targets per lane
    nil, // Range sequence
    nil, // target grouping (not currently working)
    [3,2,1] // qualification tiers
] spawn cav_ranges_fnc_createRange;

Single lane, 11 target marksman range:

_marksmanDelay = 20;
[
  "targets", //range type
  "Marksman Range", // title text
  "r7", // range tag
  1, // lane count
  11, // targets per lane
  [ // Range sequence
    ["Load your magazine",5],
    ["Range is hot!",5],
    [[1],_marksmanDelay],
    [[2],_marksmanDelay],
    [[3],_marksmanDelay],
    [[4],_marksmanDelay],
    [[5],_marksmanDelay],
    [[6],_marksmanDelay],
    [[7],_marksmanDelay],
    [[8],_marksmanDelay],
    [[9],_marksmanDelay],
    [[10],_marksmanDelay],
    [[11],_marksmanDelay],
    ["Safe your weapon.",3],
    ["Range complete.",0]
  ],
  nil, // target grouping (not currently working)
  [11,9,7] // qualification tiers
] spawn cav_ranges_fnc_createRange;