Skip to content

Map Click Teleport

shadow-fa edited this page Jan 31, 2018 · 2 revisions
File location f\mapClickTeleport
Enabled by default? no
Enable/Disable in init.sqf
Runs on client

In certain type of missions (e.g. a convoy ambush) it might be preferable to not force the player's to use a specific location but rather allow them to set their own. The MapClick Teleport feature allows mission makers to provide single players or group leaders with a simple action to get into position. It can also be used to allow for easy HALO insertions.

Additionally, this component can serve to conduct easier testing on a local machine, where the mission maker will often want to observe the action from different locations.

When activated, the component adds an action named Teleport or HALO to the player's action menu.

How to activate

Open the file init.sqf and look for the code segment entitled:

// F3 - MapClick Teleport

Edit the following lines, removing the // at the start of each line:

// f_var_mapClickTeleport_Uses = 0;
// f_var_mapClickTeleport_TimeLimit = 0;
// f_var_mapClickTeleport_GroupTeleport = false;
// f_var_mapClickTeleport_Units = [];
// f_var_mapClickTeleport_Height = 0;
// [] execVM "f\mapClickTeleport\f_mapClickTeleportAction.sqf";

Each of these variables governs a specific functionality:

Variable Value Setting
f_var_mapClickTeleport_Uses 0 Infinite uses of the teleport action
1+ Teleport uses are limited to the set value
f_var_mapClickTeleport_TimeLimit 0 No time limit to use the teleport action
1+ After the specified time (the value in seconds) has passed, the action will be removed
f_var_mapClickTeleport_GroupTeleport false Every player unit gets the teleport action and teleports only themselves
true Only group leaders get the teleport action and teleport all their group members
f_var_mapClickTeleport_Units [] The teleport action will aply to all applicable units
["UnitName1"] The action will apply only to those named "UnitName1"
f_var_mapClickTeleport_height 0 The component will use it's default teleport functionality
1+ The component changes to it's HALO functionality. Units will be teleported into the given height and equipped with parachutes.

Restricting the teleport action to specific units

If you want only to allow certain units to get the teleport action find this line:

f_var_mapClickTeleport_Units = [];

Add any unit you want into the array. For example, if you want only the units named UnitNATO_CO and UnitNATO_ASL_SL to get the teleport action, edit the line to look like this:

f_var_mapClickTeleport_Units = ["UnitNATO_CO", "UnitNATO_ASL_SL"];

Note: If the the group leader restriction is enabled (f_var_mapClickTeleport_GroupTeleport = true) it will still apply: if the unit is not a group leader it won't get the action, but if it is it will get the action and be able to teleport its group.

HALO functionality

The component can be used to deploy units in a HALO insertion instead of a teleport. To do so, modify this line:

f_var_mapClickTeleport_Height = 0;

Change the value from 0 to any higher number, though a minimum of 400 is recommended. The unit(s) will be deployed at the given height and automatically equipped with a parachute. If the unit(s) had a backpack before it will be restored upon landing.

Tips

  • This is a great tool for scouting our mission locations in the editor!
  • If a unit is in a vehicle, the vehicle will be teleported instead; the crew and passengers will remain inside the vehicle and are teleported with it.
  • Group leaders will teleport both player and AI members of their group.
Clone this wiki locally