markers and marker commands are local
this means that if you do something to them on 1 computer, only that computer see's the effect
to globalise this on all computers
simply have a trigger execute a script that sets them to empty or whatever else it is you need to do with them
when the trigger is activated, it is activated on all machines and therefore each machine will run the script locally
something like the following
lets say for instance that we want to start the mission with only west players seeing a marker called "Westbase"
but at some point in the mission, when east have received some intel, we then want to show the marker to all east and west but not resistance
Mission editorcreate an empty marker called "westbase"
;; nobody can see this marker when the mission starts
create a gamelogic and name it "server"
NB>> gamelogics are only local to the server, and therefore if one is present in the mission, the use of
?(local server):
can be used to query if a computer is the server or not
NB>> when testing on a standalone pc, you are both
local server
and
local player
a dedicated server is only
local server
Init.sqs?(side player == west):"westbase" setmarkertype "marker"
?(side player == west):"westbase" setmarkercolor "colorblue"
;; all machines run the init.sqs at the start of the mission, therefore in this case, any player who is on west will now be able to see a cross type "marker" colored blue
the mission then runs, until such a point has occured that we want to now show east the "westbasemarker" because for instance they have entered an area to meet up with a spy that has some intel for the
so a simple trigger
Activated by: East present
Set to: "once"
condition: this
On activation: [] exec "mymarkers.sqs"
mymarkers.sqshint "hello everybody"
;; every machine runs the script and prints a "hint message"
?(side player == resistance): exit
;;every machine that hasnt a resistance player will read the script this far
hint "hello everybody but resistance"
?(local server): exit
hint "hello everybody but resistance and the dedicated server or player test server"
;; If the machine isnt the server, it will read the script this far
hint "hello only east west and civilian players"
?(side player == east): "westbase" setmarkertype "marker"
?(side player == east):"westbase" setmarkercolor "colorred"
all east and west player computers will have read the script this far, but only east player computers will have switched the westbase marker to a red cross, the west players will still see the blue cross
exit
hope that helps you understand things a little better
BASICShave a script run everywhere, both on players and the server
then use the following to control what reads the script and what exits etc
? (local server) : hint "if i am the server, i will display this message (even if i am also a player)"
? ! (local server) : hint "if i aint the server, i will display this message"
? (local player) : hint "if i am a player, i will display this message"
? ! (local player) : hint "if i am a dedicated server (eg not a player), i will display this message but nobody will see it"