OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Ryote on 21 Mar 2005, 13:05:43
-
right i am designing a multiplayer map and want only certain radio messages to appear to certain players, i have added
?!(player == wplayer1): 0 setRadioMsg "NULL"
to the init
and although only that player can see that command in the drop down menu ie 0 0 6 eg all players can still see it and activte it in the radio on the map
is there anyway only that player can see his radio commands and activate them from the radio. It needs to be that way as named markers are set as booby traps and markers relate to what team can activate what boobytrap without other team knowing and is it possible for the command in the init to be made for only 2 players too see eg
?!(player == wplayer1) and (player ==wplayer2) : 0 setRadioMsg "NULL"
many thanks for any help
-
Taken from the online cpmref:
There is no 0 channel in the radio so making
0 setRadioMsg "Alpha Radio"
will not work.
available channels are from
1-8 in OFP:CWC
and added
9 and 10 in OFP:R
-
well that solved half the issue, other men cannot view other ppl radio messages. is it possible then to set up so that 2 ppl can view and activate 2 radio messages and only them?
Many thanx for your help btw
-
The answer lies in local variables, that are only recognized by one computer in a MP game. My favourite is the variable "player". Assuming you want to hide a Radio Alpha trigger from a unit named nominesine, but not from a unit named Ryote you can write:
?nominesine == player: 1 setRadioMsg "NULL"
in the init.sqs
Init.sqs is run on all computers, clients as well as server, at mission start. Since "player" will return a different value on all computers the condition will be true only on the computer where nominesine is the local player.
On the computer were Ryote plays, the condition will return the value false (because on that computer Ryote == player)
Ergo: nominesine will not be able to use the Radio Alpha trigger. Ryote will be able to use it. Good luck with your mission.