Jump to content

What are 'flags'.


Recommended Posts

I've had a good look and still dont understand what exactly 'flags' are.

 

What actually are they? I've looked at missions with them included, I've read the manual but i'm still clueless. I understand all the other triggers.

 

Weta explained as below... but i still don't get it. :helpsmilie:

 

Flags - lots of things, but among others :

 

If you have several different conditions that you want to use to trigger the same relatively complex event/behaviour, have each of the conditions set the same flag, then have a single trigger conditional on the flag for the event/behaviour.

 

or

 

you can chose between a number of discrete possibilities -

If you set 4 mission start random flags with 25% probability each will have that chance, but they might all happen at the same time...

 

to avoid more than one occurring at the same time, set two mission start randoms - 50% chance of Flag 1 , 50% flag 2

 

Then add:

Flag 1 = true & flag 2 = true, set flag 10

Flag 1 = true & flag 2 = false, set flag 20

Flag 1 = false & flag 2 = true, set flag 30

Flag 1 = false & flag 2 = false, set flag 40

 

Now you have 4 equally likely (25%) and exclusive (only one can happen at the same time) triggers that you can use for different scenarios etc

 

3 initial flags gives you 8, and so on.

 

:helpsmilie: Thanks


Edited by MadTommy

i5-3570K @ 4.5 Ghz, Asus P8Z77-V, 8 GB DDR3, 1.5GB GTX 480 (EVGA, superclocked), SSD, 2 x 1680x1050, x-fi extreme music.



TM Warthog, Saitek combat pro pedals, TrackIR 4

Link to comment
Share on other sites

Flag is discrete variable which has only 2 possible values: true (flag is raised) and false (flag is lowered).

 

Flags are common in programming, where they are used in defining states, features and etc. In DCS you can use them to mark states, for example:

 

Trigger #1: if group01 is destroyed, rise flag #1

Trigger #2: if group02 is destroyed, rise flag #2

Trigger #3: if flag #1 and flag #2 are raised, play Happy sound :music_whistling:

 

If it still looks to complex, when try to imagine it so:

let's say there is a checklist of some jobs, whose results you need to check and tick the box near entries of completed jobs. Well flag, is like check box. I hope it helps.

Wir sehen uns in Walhalla.

Link to comment
Share on other sites

Ok i think i know what they are, thanks... but i'm still in the dark about how actually to use them correctly. I have made missions with multiple triggers and don't quite get how the flags actually integrate. Maybe time will help.

i5-3570K @ 4.5 Ghz, Asus P8Z77-V, 8 GB DDR3, 1.5GB GTX 480 (EVGA, superclocked), SSD, 2 x 1680x1050, x-fi extreme music.



TM Warthog, Saitek combat pro pedals, TrackIR 4

Link to comment
Share on other sites

Another good use of flags is to introduce time delays in trigger dependencies. For example, you want to simulate a delayed reaction from enemy units under attack. So you can create a trigger zone and say:

 

Trigger1: when Unit X enters trigger zone X, set flag 1;

Trigger2: if time since flag 1 is greater than 60 seconds, activate SAM group.


Edited by EvilBivol-1

- EB

[sIGPIC][/sIGPIC]

Nothing is easy. Everything takes much longer.

The Parable of Jane's A-10

Forum Rules

Link to comment
Share on other sites

  • 1 month later...

With these flag states etc, would it be possible to trigger a said group to re spawn once dead to add more reinforcements instead of putting in endless unit groups, way points, triggers etc etc?

 

and if so ii could do with some pointers, im getting to grips with the ME, but far from where i want to be.

Asus P8P67-M Pro, i7 2600K@4.6Ghz, 4gb Vengence Ram, Gainward GTX 580 3gb Phantom, Win7 64 Ultimate, Warthog Control System.

Trackir 5 Pro, Saitek Combat Pedals.

Link to comment
Share on other sites

  • 5 months later...

although it's already been answered, I have to give a :smartass: answer to this.

 

from Merriam-Websters dictionary:

 

Main Entry:

2flag

Function:

noun

Usage:

often attributive

Etymology:

probably akin to fag end of cloth — more at fag end

Date:

1530

1: a usually rectangular piece of fabric of distinctive design that is used as a symbol (as of a nation), as a signaling device, or as a decoration

2 a: the tail of some dogs (as a setter or hound) ; also : the long hair fringing a dog's tail b: the tail of a deer

3 a: something used like a flag to signal or attract attention b: one of the cross strokes of a musical note less than a quarter note in value

4: something represented by a flag: as a: flagship b: an admiral functioning in his office of command c: nationality ; especially : the nationality of registration of a ship or aircraft

Current Sims:

DCS Black Shark, Falcon 4.0, X-Plane 9, Steel Beasts Pro PE, IL-2 1946, ArmA 2, FSX, Rise of Flight, EECH, Harpoon 3 ANW, CSP

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...