Apologies for rezzing an old thread, but I just now purchased ARMA 3 during the Steam Summer Sale, and have fallen head over heels for it. As a seasoned TableTop GM, I've fallen even harder for the Mission Editor, and am now doing a deep dive into scripting to further enrich my missions!
I've run into several problems trying to get Intel work the way I want to, and this thread nearly single-handedly saved me hours of frustration. Thanks in particular to @Larrow and @Grumpy Old Man for their code. Works like a charm, and just like I hoped! However, while everything's working fine, there's one feature I want to add to the presented code to clean things up and enhance my players' experience - Collapsible Intel Text. Let me explain:
The mission I'm building has LOTS of diaries and various other intel items that my players can pick up and study in the intel tab. Some of these diary entries are quite long (the longest is 750+ words!), and this quickly clutters up the intel tab. My goal is to have it work similarly to the TAG_fnc_documentViewer function, where you can click on underlined 'View Picture', but instead of opening a higher-resolution version of the image, the function would display the desired text within the intel tab.
I imagine it would involve creating a string that includes parseText, then calling that string within the 'this setVariable' function. Starting with:
//String Creation
_diaryentry1 = parseText "VERY LONG<br/>WALL OF TEXT"
//Intel Code (Simply displaying the text)
this setVariable ["RscAttributeDiaryRecord_texture","diarypage1.paa", true];
[this,"RscAttributeDiaryRecord",["Wanderer's Diary","_diaryentry1",""]] call bis_fnc_setServerVariable;
I imagine that the next step would be including some code that would wait for a command before displaying, the could be recalled by clicking the text again. Something like this:
//String Creation
_diaryentry1 = parseText "VERY LONG<br/>WALL OF TEXT"
_opendiary = "Open Diary"
//Base Intel Code
this setVariable ["RscAttributeDiaryRecord_texture","diarypage1.paa", true];
[this,"RscAttributeDiaryRecord",["Wanderer's Diary","{
//NEW CODE GOES HERE
_ctrl ctrlSetStructuredText parseText "_opendiary";
_diaryentry1"},""]] call bis_fnc_setServerVariable;
But I have no real idea if this is even the right place to start. My coding skills are pathetic, and that's being generous. I don't know if something like this is feasible, but I figured this thread would be the best place to ask (which is why I didn't want to create another thread). If I breached any forum etiquette in my post, I sincerely apologize - this is my first post on the BSI forums! I'm excited to see more of this place in the future. 🙂