Home   Help Search Login Register  

Author Topic: switch to map via script  (Read 514 times)

0 Members and 1 Guest are viewing this topic.

Offline mcnorth

  • Members
  • *
switch to map via script
« on: 04 Sep 2003, 07:50:12 »
Does anybody know how to switch to the map view via a script?

I want to use the action menu to call for an artillery barrage (also ilumination flares) but minimize keystrokes. So when the action menu item is selected the script needs to switch to the map view in preparation for the user to select the spot to shell. Once it's selected the script needs to change back to the typical play view.

Thanks!!!

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:switch to map via script
« Reply #1 on: 04 Sep 2003, 07:55:15 »
Forcemap, or something like that. I know there's a command thoug, you could search the reference.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:switch to map via script
« Reply #2 on: 04 Sep 2003, 08:03:41 »
forcemap true

is da command  ;)  ;D

but it may b lil buggy cuz da game wont recognize clicks on da map u forced  :-\ i think ;D but give it a shot nywayz ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline mcnorth

  • Members
  • *
Re:switch to map via script
« Reply #3 on: 04 Sep 2003, 08:55:01 »
Oh yeah, that's a little buggy. The map comes up but none of its functionality. With all the things OFP can do you'd think there would be a way of executing keystrokes via script.

Thanks for the input.

Offline Ottie

  • Members
  • *
  • And you think this is personal
Re:switch to map via script
« Reply #4 on: 04 Sep 2003, 11:22:58 »
The forcemap command is used for briefings and cutscenes it has not the same functionality as the normal m-key map
If you can't beat them, buy them

Offline Burn

  • Members
  • *
Re:switch to map via script
« Reply #5 on: 04 Sep 2003, 13:55:23 »
Besides the force map command, theres also:

mapAnimAdd frame

Operand types:
frame: Array
Type of returned value:
Nothing
Description:
Add next frame to map animation. Format of frame is [time, zoom, position], format of position is Position2D.

Example:
mapAnimAdd [1, 0.1, getMarkerPos "anim1"]

Time= time passed when moving to a marker pos.
Zoom= Zoom level
Position= Marker pos or in [x,y] coordinates. If you use getMarkerPos,
then set the marker type to invisible, (u will still be able to see it in the editor) and when u move to the marker u can use: markerName
setMarkerType "markerType"
ex:MarkerOne setMarkerType "Arrow" (it may be that u have to use quotes on the markername, but i'm not shure.)
Set marker type. Type may be any of: "Flag", "Flag1", "Dot", "Destroy", "Start", "End", "Warning", "Join", "Pickup", "Unknown", "Marker", "Arrow", "Empty"[/b]. U can also set the color of the marker by using: markerName setMarkerColor "color"...
--------------------------------------------------------------------------------\\\\\
mapAnimClear

Type of returned value:
Nothing
Description:
Clear map animation.
----------------------------------------------------------------------------------\\\\\
mapAnimCommit

Type of returned value:
Nothing
Description:
Play map animation.
----------------------------------------------------------------------------------\\\\\
mapAnimDone

Type of returned value:
Boolean
Description:
Check if map animation is finished.
----------------------------------------------------------------------------------\\\\\
By combining those u should be able to make some pretty informative Intros or cutscenes :), I also recomend checking out how BIS did it in the mission: Tank Platoon... I think it was called that, it was a "capture the hill" type of tank mission (sp), that came with one of the res patches... so just un pbo that one and open it up... there u will get answers to most of the questions about mapAnim & forceMap... ::)
hope this helped ;D ;).
« Last Edit: 04 Sep 2003, 14:08:35 by Bizon »

Offline mcnorth

  • Members
  • *
Re:switch to map via script
« Reply #6 on: 04 Sep 2003, 19:08:12 »
WOW!!! That's in depth. Ok, I'll dive into map anims when I have enough time to get through the learning curve. But do you think they'll get me to the map view with the same functionality of the "m" key?

Thanks for the detail.

Offline Burn

  • Members
  • *
Re:switch to map via script
« Reply #7 on: 04 Sep 2003, 20:51:21 »
Quote
do you think they'll get me to the map view with the same functionality of the "m" key?
Unfortunetly I'd have to say no on this one :-\...
I don't think you can use forceMap as you do with the m key :(...
and showMap is only to toggle map enabled\disabled in the description.ext file... I think ::)