Trip Flare

From F2 EN
Jump to: navigation, search

Description

The Trip Flare component allows the mission designer to simulate trip flares - bright flares that are automatically ignited when a person triggers a tripwire. When the trip flare is activated it creates a bright, smoking light source on the ground for 35 seconds. Any AI within 300m of the flare which are not on the same side as the triggering unit will be alerted to the presence of all units within 25m of the flare itself. These flares can be pre-placed by the mission maker, or by designated (playable) units in-game.

Required files

All the code associated with this component is found in:

  • f\common\f_tripFlare.sqf
  • f\common\fa_tripwire_init.sqf
  • f\common\fa_tripwireaction.sqf

How to activate

See below.

How to use

Pre-placed in the editor

In the editor create a trigger with the following key properties:

PropertyValueNotes
Axis a5Any value is supported, but 5-15 is suggested
Axis b5Any value is supported, but 5-15 is suggested
ActivationSee notesThe side you want to activate the trigger
On Act._null = [thisList] execVM "f\common\f_tripflare.sqf";This calls the actual script

Placed by designated playable units in-game

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

// F2 - Tripwire action

Edit the following line:

// [[UnitName1,UnitName2],25,2,east] execVM "f\common\fa_tripwire_init.sqf";

In this line:

  • Unitname1 and UnitName2 are the names of the units that should be able to place trip flares.
  • 25 and 2 are length and width of the tripwire.
  • east is the side of the units that should trigger the tripwire; values you can use are:
    • west
    • east
    • resistance
    • civilian

For example, if want the US Army CO and DC to be able to place tripwires of 35*5 that are triggered by enemy resistance forces edit the line to read:

[[UnitUS_CO,UnitUS_DC],30,5,resistance] execVM "f\common\fa_tripwire_init.sqf";

When the unit places a trip flare in-game a set of markers will appear to her/his faction:

TripFlare markers.jpg

Tips

  • The tripwire's centre is the unit placing it, the length value is to the placing unit's front and back, the width value its sides.
  • The trip flare will appear at the location where the triggering unit enters the trigger area.
  • When AI are informed of the units within 25m of the flare, they may not open fire at once. The AI will only know roughly that the triggering units are there - they will still need to be within the AI's night time engagement range before the AI will open fire.
  • A playable unit may only place one (1) trip flare in-game.

Credits

  • beta
  • Fer
  • Wolfenswan