JohnKalo 657 Posted July 4, 2019 Hey guys in the mission I am working on I would like, while ingame, the map to open and show some certain locations. Like show the first one and then show the second one and so on. There is however an issue .... I could not find a way to make the map change the location it focuses on steadily. It just shows the second marker instantly. Does not seem right So how can I make the map open and show different markers steadily. Like in the Tactical Ops DLC missions if I recall correctly. What I have so far in my humble script: openMap true; Sleep 0.01; ((uiNamespace getVariable "RscDiary") displayCtrl 51) ctrlMapAnimAdd [0,0.05,getMarkerPos "marker01"]; ctrlMapAnimCommit ((uiNamespace getVariable "RscDiary") displayCtrl 51); Sleep 5; ((uiNamespace getVariable "RscDiary") displayCtrl 51) ctrlMapAnimAdd [0,0.02,getMarkerPos "marker02"]; ctrlMapAnimCommit ((uiNamespace getVariable "RscDiary") displayCtrl 51); Sleep 5; openMap false; Share this post Link to post Share on other sites
7erra 629 Posted July 4, 2019 How are you executing the code? Is suspension allowed? 1 1 Share this post Link to post Share on other sites
Larrow 2827 Posted July 5, 2019 8 hours ago, JohnKalo said: ctrlMapAnimAdd [0 0 here is the time it takes the map to animate to the given position. 8 hours ago, JohnKalo said: It just shows the second marker instantly. As @7erra says your code needs to be able to suspend (spawn, execVM). Else the sleeps do not work and you will immediately see last anim before map closes. Spoiler openMap true; { //Animate map to positoin over 4 seconds ((uiNamespace getVariable "RscDiary") displayCtrl 51) ctrlMapAnimAdd [4,0.05,getMarkerPos _x]; ctrlMapAnimCommit ((uiNamespace getVariable "RscDiary") displayCtrl 51); //Wait until animation has finished waitUntil { ctrlMapAnimDone ((uiNamespace getVariable "RscDiary") displayCtrl 51) }; //Pause for a further 1 second at position sleep 1; }forEach [ "marker01", "marker02" ]; openMap false; 3 1 Share this post Link to post Share on other sites
7erra 629 Posted July 5, 2019 8 hours ago, Larrow said: ((uiNamespace getVariable "RscDiary") displayCtrl 51) ctrlMapAnimAdd [4,0.05,getMarkerPos _x]; Hmmm. Setting the commit time to 4 will take 4 seconds to even reach the position. It would probably be better to commit in one second and sleep for four. 1 1 Share this post Link to post Share on other sites
JohnKalo 657 Posted July 5, 2019 Quote How are you executing the code? With an execVM through a trigger. Quote 0 here is the time it takes the map to animate to the given position. Dang thought it was something like the sleep command. Quote As @7erra says your code needs to be able to suspend (spawn, execVM). Else the sleeps do not work and you will immediately see last anim before map closes. And was wondering what suspension was Yep that is a better code indeed. I will try it out and if an issue occurs I will report back. Thanks guys!! 2 Share this post Link to post Share on other sites