Jump to content

Condition User Flag Is


ENO

Recommended Posts

I'm trying to set it up that a variety of different forces are assembled via multiple means in various different landing zones. Currently, I'm setting it up so that they are in a "hold" condition until a particular flag is reached (when (part of) all groups are in the zone.)

 

I have a stop condition for that hold set up based on "User Flag is" with the value of the flag set for when that array is all in zone.

 

I haven't tested it out yet- but I figured I'd post it here as a way of helping potentially answering future questions on ways that may be better to accomplish the same objective (if THIS one is even going to work).

 

Is that what the "User Flag is" stop condition is for or am I in the wrong?

 

Thanks.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Yep. But it is sadly limited from 1 to 100. Also the tick box next to it means ticked, flag is true. Or not ticked, flag is false.

 

The lua condition box can of course use anything including any flag number.

This should do the trick for a stop condition if flag xyz is true.

return trigger.misc.getUserFlag('xyz')

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Thanks Grimes- I can work within that limitation though of course I had all my flags set for 1000 + rrrrrr.

 

Ah well, at least now I can go fix it properly.

 

Is that a ME limitation somewhere or did they just figure that 100 was enough? Seems like an odd limit considering what flags are available overall.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

UI decision I think. Extra digits take up extra space when there isn't much space to give.

 

But yeah, from BS1 to FC2 there was a flag limit of 100 for some silly reason. With FC2 it got raised to 1000000 I think. Of course that was all before the new AI task system which added start and stop conditions and flags being able to store numerical values along with relevant triggers.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Regular flags have 5 digits.

 

I have poked at the User Flag Is but because it is limited to 3 digits, it doesn't play nice with my flag scheme that uses 5.

 

WC

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

The benefit here on my end is that there are times where I want to "hold" vehicles in a position for an unknown amount of time... (because it's based on another dynamic user event happening) What I've had to do in the past is "activate" a group that had been standing as "visible before start" during a late activation... which of course results in them just being empty shells.

 

Alternatively, I've had "sitting" units that were active that were then deactivated and a clone activated to move on task. This is a little extra work that, if viewed at the wrong time, can look pretty strange.

 

Having a "user flag is" ability allows you to do this without generating a script or activating a unit through another flag action or AI task... you're simply referencing a flag that already exists anyway.

 

Though I see the benefits of your 5 digit system- still haven't adopted it formally but I am CONSTANTLY regretting it- I can also see where you and I could benefit in the way we are a little more trigger orientated.

 

I still don't have the courage to go full bore on scripting though I must admit Grimes has made it pretty freakin easy to follow.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

LOL

 

I do it this way, to make a vehicle group stop until something else happens -

 

At the waypoint where you want the vehicle group to hold, add an Advanced Waypoint Action to do that.

 

Then, using the Triggered Actions icon, add in a triggered event of Hold -x (or whatever it is that takes the group off of hold. Then use the AI Push Task or whatever it is called (can you tell I'm not at my home computer?) and use the condition that will run the Action to call the group's triggered action to take it off hold so it can continue on its path.

 

Back To Class has this for the Blue VGrp that stops outside of Mozdok until Red destroys the Blue in Mozdok.

 

WC


Edited by Wrecking Crew

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

Yeah, that's the alternative- I am still getting my head around the AI Task Push... not using it fluidly yet. I find that I can use that when a stop condition box doesn't exist (not sure why they don't in some cases... now that I think about it.)

 

But they don't- so it's a decent work around.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Yeah, that's the alternative- I am still getting my head around the AI Task Push... not using it fluidly yet. I find that I can use that when a stop condition box doesn't exist (not sure why they don't in some cases... now that I think about it.)

 

There 4 sub-categories of actions the AI can perform. Technically speaking these are also referred to as "tasks", but 2 of the 4 sub-categories also use the term "task" to describe what is going on, so it is a tad confusing. So whenever I say "task" it can be any of these and not just the items with the label "task".

 

Perform Task> Sets task to the top of the priority and will continue the task until it is complete. Generally it is used for doing an action immediately.

Start Enroute Task> Adds task as part of the flight plan. Can perform other tasks before moving on to this one. Used to give AI multiple tasks to complete.

Perform Command> Done instantly, therefore it takes no "time" to complete and has no stop condition. Most commands are a mix of tasks and options, but they don't entirely fit in either category.

Set Option> Done instantly, also has no stop condition. Usually these are to change AI behavior.

 

 

Generally stop conditions are a little more straight forward than using scripts/triggers as the logic is directly tied into the group. But there really is no wrong way to do anything as long as it works.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Thanks Grimes.

 

Eno, with the AI Task Push - you prolly have seen it, but there has to be some Triggered Actions in existence so that they will appear in the drop down list for Action's argument.

 

I am seeing a lot of Triggered Actions from previous DCS versions that have a '!' at the end - these '!' indicate a problem with the action that has to be resolved. Usually all it takes is finding the Triggered Action and clicking on it to make the exclamation point go away, but I have also had to replace some of them.

 

WC

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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