ldnsmudge 4 Posted November 10 Hi Guys, New to scripting and having trouble finding any info on whether its possible to close a diary record, but keep the map open, when selecting a map marker. My briefing text is fairly long and when I select the <marker> and the map moves it to the centre, the marker is covered by the text window. I saw a selectDiarySubject command and wondered whether it was possible to switch from my Briefing subject "The Hub" to "Map" when the marker tag is clicked. The thinking being that this should close the larger Hub window, but I'm not sure if thats possible or what the embedded syntax looks like to achieve that. Does anyone have any suggestions as to whether what I'm trying to do is possible and if so, what the right way to go about it might be. player createDiaryRecord ["Diary", ["The Hub"," For the duration of your stay you will based here at <marker name=theHub>'The Hub'</marker>,a Joint Operations Centre (JOC) in Mexico.<br/>"+ "<img image='images\theHubsml.jpg' width='329' height='185' title='The Hub' /><br/>"+ "<br/> The..."]]; Share this post Link to post Share on other sites
ldnsmudge 4 Posted November 12 Either I asked a really dumb question - or a really cool difficult problem that no-one else has ever thought about😏 Share this post Link to post Share on other sites
soldierXXXX 107 Posted November 12 Hi, it's doable, if you don't mind loosing the blue lines pointing to the marker. You just have to script map animation youself. For that you should use execute tag, which is part of the diary system. player createDiaryRecord ["Diary", ["The Hub"," For the duration of your stay you will based here at <execute expression='player selectDiarySubject ""Map"";mapAnimAdd [1, 0.1, markerPos ""theHub""];mapAnimCommit;'>The Hub</execute>,a Joint Operations Centre (JOC) in Mexico.<br/>"+ "<img image='images\theHubsml.jpg' width='329' height='185' title='The Hub' /><br/>"+ "<br/> The..."]]; Share this post Link to post Share on other sites
ldnsmudge 4 Posted November 12 Thanks @soldierXXXX the selectDiarySubject is working as expected, just the mapAnimAdd is failing to trigger. Which gives me something to work with. The fact the diary changes means the execute expression is working, which is further than I've got so far. I'll play around with the pos, maybe switch it out for a map pos rather than the marker, see how that goes. Thanks again. Share this post Link to post Share on other sites
soldierXXXX 107 Posted November 12 Oh, right. MapAnimAdd only works during mission, my bad 😄. Here is fixed code. player createDiaryRecord ["Diary", ["The Hub"," For the duration of your stay you will based here at <execute expression='player selectDiarySubject ""Map"";if ((findDisplay 37) isNotEqualTo displayNull) then { private _ctrlMap = ((findDisplay 37) displayCtrl 51); _ctrlMap ctrlMapAnimAdd [1, 0.1, getMarkerPos ""theHub""];ctrlMapAnimCommit _ctrlMap;} else {mapAnimAdd [1, 0.1, markerPos ""theHub""];mapAnimCommit;}'>The Hub</execute>,a Joint Operations Centre (JOC) in Mexico.<br/>"+ "<img image='images\theHubsml.jpg' width='329' height='185' title='The Hub' /><br/>"+ "<br/> The..."]]; 2 Share this post Link to post Share on other sites
ldnsmudge 4 Posted November 12 Dude you're the best. That works perfectly. Looking at how you did that, I would have never got there in a month of Sundays. Thanks very much 1 Share this post Link to post Share on other sites