Jump to content

Recommended Posts

Posted

Increase the Is User Flag from its current limit of 1-100 to 1-99999.

 

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.

  • 5 weeks later...
Posted (edited)

You can use the script box with a very easy scripting function to achieve the same results. :)

 

if trigger.misc.getUserFlag(12345) == true then

--env.info('1, 2, 3, 4, 5... That is a combination an idiot would have on his luggage!')

return true

end

Edited by Grimes

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

Posted (edited)
You can use the script box with a very easy scripting function to achieve the same results. :)

 

if trigger.misc.getUserFlag(12345) == true then

--env.info('1, 2, 3, 4, 5... That is a combination an idiot would have on his luggage!')

return true

end

 

Hi Grimes,

Are you talking about the Advanced Waypoint Actions (AWA),,, Stop Condition -> Condition (LUA Predicate) dialog box?

 

In particular, I want to have an Orbit AWA that will go on and on until the Flag 58104 goes true. When that flag goes True then I want the a/c to stop orbiting and continue to the next waypoint.

 

Is this all that is needed in the Stop Condition's 'Condition (LUA Predicate)' dialog box -- ?

if trigger.misc.getUserFlag(58104) == true then

return true

end

And that ^^^ by itself will cause the a/c to exit the orbit? That would be wonderful.

 

Thanks, 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.

Posted

Hmm, didn't work.

 

I put this into the Advanced Waypoint Action for an Orbit Stop Condition, into the Condition (LUA Predicate) dialog box:

if trigger.misc.getUserFlag(58104) == true then

return true

end

 

I also loaded Mist at the beginning of the mission and that did not help.

 

The Flag 58104 is being set True by another event. And other follow-on events that are based on this flag to trigger, so I know the Flag 58104 is really True.

 

What else do I need to do?

 

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.

Posted

You may need to put the flag number in quotes to make it a string.

trigger.misc.getUserFlag('58104')

 

Also use env.info(trigger.misc.getUserFlag('58104')) to check what value is assigned to that flag in DCS.log to ensure that it returns a flag value and its the right value (true).

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

Posted

I am not having any success. The mission is attached. I'm not sure where to put the strings you provided -- I put them into the Stop Condition box. If you would take a look I'd be grateful.

 

When the Blue C-130 enters its orbit a Radio Item Add triggers and a message is displayed for 20 seconds. Wait >20 seconds before activating the radio call which sets Flag 58104 to True.

 

The Blue C-130 won't exit from its orbit. :-P

 

 

I searched the logs but found no match to 58104.

 

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.

Posted

Derp on my part. It returns a number value, not a boolean.

 

if trigger.misc.getUserFlag('58104') == 1 then

return true

end

 

If a flag needs to be false it would need to equal (==) 0. Any true statement would be

if trigger.misc.getUserFlag('58104') > 0 then

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

Posted

Now that you say it, doh, all my other flag examples use 0 or 1.

 

Thanks, Grimes.

 

(I was thinking the same thing -- this belongs in the Mission Builders Corner.)

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.

  • Recently Browsing   0 members

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