Home   Help Search Login Register  

Author Topic: Radio Commands  (Read 1234 times)

0 Members and 1 Guest are viewing this topic.

Ryote

  • Guest
Radio Commands
« 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

Code: [Select]
?!(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

Code: [Select]
?!(player == wplayer1) and (player ==wplayer2) : 0 setRadioMsg "NULL"

many thanks for any help
« Last Edit: 21 Mar 2005, 13:06:27 by Ryote »

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Radio Commands
« Reply #1 on: 21 Mar 2005, 14:41:13 »
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
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Ryote

  • Guest
Re:Radio Commands
« Reply #2 on: 21 Mar 2005, 16:14:25 »
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

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Radio Commands
« Reply #3 on: 21 Mar 2005, 22:45:30 »
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.
« Last Edit: 21 Mar 2005, 22:46:40 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!