Jump to content

Recommended Posts

Posted

For debugging purposes it would be very handy to write out the state (true/false) or value (e.g. number from 1 to 100) of any number of flags in the form of a message to a specific unit or even to a spectator. 

Just like in C, these could be done with a slash or other tag in the message text field e.g. "This is text in the message text field, and here are the flags I'm interested in:

##MYFLAG1.VALUE##

##MYFLAG2.STATE##

This is the end of the text in the message field box."

  • Like 1
Posted
17 hours ago, Elphaba said:

For debugging purposes it would be very handy to write out the state (true/false) or value (e.g. number from 1 to 100) of any number of flags in the form of a message to a specific unit or even to a spectator. 

Indeed. Until ED provide some better debugging support, this may help you as a stop-gap:

 

  • Like 1
  • 2 months later...
Posted

... a little late to the post, but here is what I use.  Use an F10 Radio flag to run it --

-- Displaying Flag Values With Text Messages
-- Use a Do Script Action (does not require Mist) -
local msg = {}
msg[#msg + 1]='Blue All Points Flag 10000 value = '
msg[#msg + 1]=trigger.misc.getUserFlag('10000')
msg[#msg + 1]='. \n'
msg[#msg + 1]='Blue Vehicles In Zone Points Flag 20000 value = '
msg[#msg + 1]=trigger.misc.getUserFlag('20000')
msg[#msg + 1]='. \n'
msg[#msg + 1]='. \n'
msg[#msg + 1]='Blue Aircraft Points Flag 50000 value = '
msg[#msg + 1]=trigger.misc.getUserFlag('50000')
msg[#msg + 1]='. \n'
msg[#msg + 1]='Blue Heli Points Flag 60000 value = '
msg[#msg + 1]=trigger.misc.getUserFlag('60000')
msg[#msg + 1]='. \n'
msg[#msg + 1]='Blue Vehicle Points Flag 70000 value = '
msg[#msg + 1]=trigger.misc.getUserFlag('70000')
msg[#msg + 1]='. \n'
msg[#msg + 1]='Blue Ship Points Flag 80000 value = '
msg[#msg + 1]=trigger.misc.getUserFlag('80000')
msg[#msg + 1]='. \n'
msg[#msg + 1]='\n'
msg[#msg + 1]='Press Pause to freeze the action. \n'
trigger.action.outText(table.concat(msg), 6)

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

Yeah, this was all before I learnt scripting. 

I still say that it should be covered in the ME 'without' having to use scripting. But yeah, I am able to do this now. Thanks. 

  • Recently Browsing   0 members

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