Reinforcements scriptEdit

In the Demo mission on Utes you can find example for reinforcements script for SP.

The best way to call reinforcements is to set up a radio call (a trigger) that executes this script -- don't forget to set the trigger on repeatable.

You have example in WICT_demo_DEBUG.utes\WICT_data\load\loader.sqf

[position player, "MH60S", (round(random 360)), 650, ["USMC_Soldier_Medic", "USMC_Soldier_Medic","USMC_Soldier_Medic","USMC_Soldier_Medic","USMC_Soldier_AT","USMC_SoldierM_Marksman","USMC_Soldier_MG","USMC_Soldier_AA"]] execVM "WICT\support\reinforce.sqf";

[#1, "#2", #3, #4, [#5],#6,#7] execVM "WICT\support\reinforce.sqf";

#1 -- call position (position)
#2 -- vehicle classname (string)
#3 -- direction (number)
#4 -- spawn distance (number)
#5 -- cargo classnames (array of strings)
#6 -- support after insertion, true/false (boolean) -- optional
#7 -- automatic eject, true/false (boolean) -- optional

When player's unit has less than 3 members (only player or player and one more switchable unit), player will be able to call for reinforcements. Reinforcements won't come if above mentioned condition is not met, or reinforcing is in progress -- player will get a message "Reinforcements unavailable at this moment!!!".

Reinforcements will come and try to stay above the player giving him opportunity to issue two orders :

  1. landing (and they will land under fire) -- Space > 4 > 1 (disembark)
  2. HALO -- Space > 6 > 2 (eject)

Tips and tricksEdit

Here are some tweaks and comments I found particularly interesting in correspondence with Velocity (quotings) :

To start with, the script is really great for SP & Coop purposes as it fits into the sandbox-related gameplay. Also it provides the player with the "possibility" to get killed without having to restart the mission (as you can switch between your teammates). As you can see, it really supports the overall gameplay and therefore shouldn't be neglected.
First I'd like to discuss certain problems which occured during the game and which should be resolved quite easily :

Eject problemEdit

I've noticed that troopers normally bail out at one go which often results in casualties as the get killed when they collide with each other. To fix this I would suggest to introduce a little delay between each jump, which also would bring some realism to the event.

Here is the fix -- use :

#6 -- support after insertion, true/false (boolean) 

: + 

#7 -- automatic eject, true/false (boolean)

Example :

[position player, "C130J", (round(random 360)), 1000, ["USMC_Soldier_Medic", "USMC_Soldier_Medic","USMC_Soldier_Medic","USMC_Soldier_Medic","USMC_Soldier_AT","USMC_SoldierM_Marksman","USMC_Soldier_MG","USMC_Soldier_AA"],false,true] execVM "WICT\support\reinforce.sqf";

Land problemEdit

Choppers often have problems to find a suitable landing spot when they are under fire / within action. This normally results in annoying scenes in which the AI flies around in circles without landing at all.

In this script they shouldn't do that... They have orders to keep their stance on green until they have no cargo, and it is reported that they land even under heavy fire.

Different radio callsEdit

During the game I often asked myself why I couldn't choose the troopers who were ordered over the radio. As WICT is a tool intended to provide the player with a sandbox-gameplay it would be very convincing to give the player a basic choice which reinforcements he wants to order. (Of course a mission designer can include certain triggers which resolve in other radio-channels in order to select other troops - but this is rather complicated and therefore should be included in the script) So how should it work? You could introduce a dialog within the radio-channel in which the player can choose basic things like "I want to have snipers" or "I need medics and some AT soldiers" and so on ...

Which is actually not so complicated -- you (as a mission designer) can freely change the composition of the units that will spawn as your team -- change the cargo array :)

Different transport vehiclesEdit

Next point would be the fact, that you always use a chopper in order to transport the new troops. I would suggest to make it more dynamic by using a random transport-aircraft, as there are many included in the game (like: C130J, C130J_US_EP1, MH6J_EP1, UH60M, CH_47F(!), ...).

Which is, again, easy to achieve by choosing a vehicle type -- you can also combine certain vehicle type with certain reinforcements composition -- be aware that for cargo planes you use optional parameters (look example above)
#6 -- support after insertion, true/false (boolean) 

: + 

#7 -- automatic eject, true/false (boolean)

Requisition pointsEdit

Last but not least you could combine the script with a supply system which gives the player some sort of "requisition points" in order to request new units? A function like that would greatly improve the gameplay & fun as most players love to have something like that in sandbox games.

Which can be done with COIN system like this :
private ["_coin","_coinOp","_coinFunds","_str_coin","_str_coinOp","_oldFunds"];

// ====================================================================================

// The Construct Module Name, Construct Operator, Type of Funds and Funds amount are passed from the script call

_coin = MyCOIN;
_coinOp = "MyEngineer";
_coinFunds = 5000;
_str_coin = str _coin;
_str_coinOp = str _coinOp;
if (isNull (call compile format ["%1", _coinOP]))exitWith{}; 
_coinOP = call compile format ["%1",  _coinOP]; 
if (player != _coinOp) exitWith {};

call compile format ["_coin setvariable [""BIS_COIN_funds"",[""%1Var""]];",_str_coin];

_oldFunds = 0; //set it as number

call compile format ["_oldFunds = 0 + %1Var",_str_coin];

if (_oldFunds > _coinFunds) then

    _coinFunds = _oldFunds -_coinFunds; //here we substract requisition points

    call compile format ["%1Var = _coinFunds",_str_coin]; //sets new amount of requisition points
    _coin setvariable ["BIS_COIN_fundsDescription",[""]];
    _coin setvariable ["BIS_COIN_areasize",[30,30]];


    hint "Reward : reinforcements called";
    hint "Not enough requisition points";

You see, what I did is to check whether player has enough requisition points to call the reinforcements.