Home   Help Search Login Register  

Author Topic: Centering a forced map on a specific marker  (Read 1248 times)

0 Members and 1 Guest are viewing this topic.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Centering a forced map on a specific marker
« on: 06 Aug 2011, 20:51:11 »
Hey guys, I'd like to force the map to screen and then center the map on a marker so that all relevant information is being seen. Otherwise, the map comes up where the player last adjusted it and the new intel can not be seen. Any ideas?

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: Centering a forced map on a specific marker
« Reply #1 on: 07 Aug 2011, 20:51:14 »
I think it can be done with the map animation commands, but a cut scene might have to run to make it work. I will play around with it tonight to see what I find.

Walter_E_Kurtz

  • Guest
Re: Centering a forced map on a specific marker
« Reply #2 on: 08 Aug 2011, 17:43:36 »
It's a lot like scripting a cutscene, only slightly easier thanks to the two dimensions involved. Something like the following should work on a new marker named obj_marker:

Code: [Select]
showGPS false
showPad false
showCompass false
showWatch false
showRadio false

mapAnimClear
mapAnimAdd [1, 0.25, getPos player]
mapAnimCommit
ForceMap true
@mapAnimDone

~2

mapAnimAdd [2, 0.1, getMarkerPos "obj_marker"]
mapAnimCommit
@mapAnimDone

~2

ForceMap false

showGPS true
showPad true
showCompass true
showWatch true
showRadio true
A lot of that isn't strictly necessary:
   show... false / true hides the bits and pieces that might obscure the map screen
   the first mapAnimAdd [... getPos player] moves the map to the player's position from wherever it was before.

mapAnimAdd is fairly straightforward, the only non-obvious aspect being the zoom attribute. This could rather be considered the resolution: the lower the number, the finer detail that can be seen - ie. greater zoom into the map. As if that's made things any more clear.

However, I can't find an off-screen way of returning the map to the player's position, so it will remain centered on the new objective.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Centering a forced map on a specific marker
« Reply #3 on: 10 Aug 2011, 02:36:36 »
Ah! Perfect. I just didn't know what command to look for. I had seen it in a previous campaign somewhere but couldn't find which one. Thanks bunches fellahs, now I can finish polishing things.

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Centering a forced map on a specific marker
« Reply #4 on: 10 Aug 2011, 09:57:50 »
Theres a good example of the 'forcemap' command in the mission 'Tank Platoon', as well as in the 'Grunt ONE' campaign by Mandoble.
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba