Wrecking Crew Posted October 22, 2013 Posted October 22, 2013 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.
Wrecking Crew Posted November 21, 2013 Author Posted November 21, 2013 bump :-) 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.
Grimes Posted November 21, 2013 Posted November 21, 2013 (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 November 21, 2013 by Grimes The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
ENO Posted November 21, 2013 Posted November 21, 2013 Hmmmm that's actually handy to know. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Wrecking Crew Posted November 26, 2013 Author Posted November 26, 2013 (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 November 26, 2013 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.
Wrecking Crew Posted November 26, 2013 Author Posted November 26, 2013 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.
Grimes Posted November 27, 2013 Posted November 27, 2013 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Wrecking Crew Posted November 27, 2013 Author Posted November 27, 2013 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.
Grimes Posted November 27, 2013 Posted November 27, 2013 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Wrecking Crew Posted November 27, 2013 Author Posted November 27, 2013 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.
Recommended Posts