OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Freno on 17 Jan 2003, 21:16:39

Title: Units visible on the map?
Post by: Freno on 17 Jan 2003, 21:16:39
How can i make all units on one side visible all the time on the map, when playing
MP commanding several groups its nice to know where they are on the map.
  ???
Title: Re:Units visible on the map?
Post by: Tactician on 18 Jan 2003, 23:22:11
You could make a marker for each unit and run a loop to setMarkerPos the marker to the unit's position every few seconds.  Here's an example.

Say you have four soldiers named w1, w2, w3, and w4.  You want their position to be updated on the map, but only for the west team.  Make markers named w1m, w2m, w3m, w4m then make this script:

Code: [Select]
;; begin wmarkers.sqs
#start
~1
"w1m" setMarkerPos (vehicle w1)
"w2m" setMarkerPos (vehicle w2)
"w3m" setMarkerPos (vehicle w3)
"w4m" setMarkerPos (vehicle w4)
goto "start"
;; end wmarkers.sqs

Now you need to execute this script, so add this line to init.sqs:

Code: [Select]
?(side player == WEST): [] exec "wmarkers.sqs"
So every west player will see a marker for these units.  Expand it as necessary to fit your map.
Title: Re:Units visible on the map?
Post by: Freno on 19 Jan 2003, 20:46:16
Ok thanks, is it possible to do that for east and resistance to? ???
Title: Re:Units visible on the map?
Post by: Tactician on 20 Jan 2003, 03:27:34
Yes.