User flags ????? - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 07-31-2013, 08:57 AM   #1
Red.01
Junior Member
 
Join Date: Jul 2012
Posts: 39
Default User flags ?????

Hi all,

Forgive me for being stupid but I don't understand user flags.

I am trying to use geloxo's great script for my mission,The only thing I'm getting stuck on is this line.

CountLogistics("triggerName",flagLog) Where: "triggerName" = name of trigger to supervise flagLog = userflag to count the number of logistic items inside trigger Example: CountLogistics("trigger1",300) this will count the items inside "trigger1" and store the values in the flag 300 (which can be accessed by mission)

What is flag 300????

Thanks in advance

Red
Red.01 is offline   Reply With Quote
Old 07-31-2013, 09:09 AM   #2
Grimes
ED Testers Team
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 8,052
Default

There is no difference between "user flags" and "flags", the game uses both terms interchangeably, but both mean the same thing.

Flags are a variable that is accessible to the scripting engine and the mission editor. Flags are indexed numerically and store a numerical value. However flags can also be interpreted as true/false. Wherein any number greater than 0 is considered 'true', while 0 itself is 'false'.

Within the mission editor you use flags with triggers to store values. These values can be checked by triggers to cause events in the mission to occur. For example if I wanted a group to activate 60 seconds after another group has been killed I could use two triggers:
Once> Group is Dead> Set Flag 30 to True
Once> Time Since Flag 30 is 60 seconds> Group Activate 'Group 2'
__________________
You can only tie the world record for lowest flight.
Current Projects: Scripting Wiki, Something...
Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD for DCS 1.5/2.0, IADScript, Mission Editing Wiki!, Mission Building Forum
Grimes is offline   Reply With Quote
Old 07-31-2013, 12:14 PM   #3
Red.01
Junior Member
 
Join Date: Jul 2012
Posts: 39
Default

Excellent Grimes,

Now I get it,Thanks for you input now I can finally start to make some more complex missions.

Cheers
Red
Red.01 is offline   Reply With Quote
Old 07-31-2013, 12:29 PM   #4
Merlin-27
Veteran
 
Merlin-27's Avatar
 
Join Date: Jan 2013
Location: New Jersey
Posts: 1,170
Default

Good question and great detailed answer. I learned something too.
__________________

[Dogs of War] WWII COMBAT SERVER | P-51D - FW190-D9 - Me109-K4
Visit Our Website & Forum to Get More Info & Team Speak Access
Merlin-27 is offline   Reply With Quote
Old 11-09-2019, 04:19 PM   #5
xXMustangXx
Junior Member
 
Join Date: Jul 2013
Posts: 29
Default

Quote:
Originally Posted by Grimes View Post

Within the mission editor you use flags with triggers to store values. These values can be checked by triggers to cause events in the mission to occur. For example if I wanted a group to activate 60 seconds after another group has been killed I could use two triggers:
Once> Group is Dead> Set Flag 30 to True
Once> Time Since Flag 30 is 60 seconds> Group Activate 'Group 2'
Can you, or anyone, please give an example on how would you put this in a script? both using MIST and Moose (if different)?

Thank you!!
xXMustangXx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:26 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.