Derk Posted October 28, 2012 Share Posted October 28, 2012 Hi there, Is it possible to display a message that contains a flag's value? ie message: "[flag 1 value] units of supplies have been delivered to Tblisi. Tblisi now has a total of [flag2 value (flag2 + flag1)] units of supplies." Thank you. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Grimes Posted October 28, 2012 Share Posted October 28, 2012 Yes, but you must use the simulator scripting engine. The relevant code I am using is detailed here: http://en.wiki.eagle.ru/wiki/Simulator_Scripting_Engine/DCS:_World_1.2.1/Part_1 do local x = trigger.misc.getUserFlag('1') local y = trigger.misc.getUserFlag('2') y = y + x trigger.action.outText(x .. ' units of supplies have been delivered to Tblisi. Tblisi now has a total of ' .. y .. ' units of supplies.' , 20) trigger.action.setUserFlag('2', y) end 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 Link to comment Share on other sites More sharing options...
Derk Posted October 28, 2012 Author Share Posted October 28, 2012 Thanks Grimes, that'll do just fine! [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Recommended Posts