OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: CptBravo on 13 Nov 2004, 07:43:05

Title: Hiding Radio
Post by: CptBravo on 13 Nov 2004, 07:43:05
Hi,

I have searched forum trying to find info on how to hide radio chanelss from other player in MP. so in MP each side will have access to 5 radio channels. So West Alpha through Echo .. and East Foxtrot through Juliet

How do I hide them so I each side can only see its specific radio channels??

Thanks for the help.
Title: Re:Hiding Radio
Post by: Killswitch on 13 Nov 2004, 14:39:46
See the command reference and have a look at the setRadioMsg command.

Code: [Select]
3 setRadioMsg "Something"will set "Radio Charlie" or 0-0-3 to "Something"

Code: [Select]
3 setRadioMsg "NULL"will make Radio Charlie disappear, i.e be unavailable

How you use that to get, say five radio options for west and five for east is left as an exercise.  ;D
Title: Re:Hiding Radio
Post by: CptBravo on 13 Nov 2004, 16:49:15
Hey thanks for teh reply. Only question now is .. How? :)
3 setRadioMsg "NULL" I assume hides Radio Charlie? If so, how do you use it to specify only west see it? In a Trig? init.sqs?

Thanks for the help.
Title: Re:Hiding Radio
Post by: Killswitch on 14 Nov 2004, 16:56:17
init.sqs will be fine. Assumption: East side players will use radio Alpha-Echo and west will use Hotel-Juliet.
Code: [Select]
~0.5
goto format ["%1",side player]
; If player is on side res or civvie, we just fail silently and exit
exit

#east
{_x setRadioMsg "NULL"} forEach [6,7,8,9,10]
exit

#west
{_x setRadioMsg "NULL"} forEach [1,2,3,4,5]
exit
Tada!
Title: Re:Hiding Radio
Post by: CptBravo on 18 Nov 2004, 20:08:33
You're the best! Works perfecto now! Last related question .. I am trying to add resistance to east side so they can only access same radio channels .. that I can not get to work. Resistance still see West radio. I have copied and pasted below. Please show me what I am doing wrong.

Thanks again!  

~0.5
goto format ["%1",side player]
; If player is on side res or civvie, we just fail silently and exit
exit

#resistance
{_x setRadioMsg "NULL"} forEach [1,2,3,4,5]
exit

#east
{_x setRadioMsg "NULL"} forEach [1,2,3,4,5]
exit

#west
{_x setRadioMsg "NULL"} forEach [6,7,8,9,10]
exit
Title: Re:Hiding Radio
Post by: Larsen on 18 Nov 2004, 22:26:23
Resistance is called GUER - just change the name from:

#resistance

to:

#guer

Title: Re:Hiding Radio
Post by: CptBravo on 19 Nov 2004, 15:45:13
Ahhhhhhhhhhhh!! Thanks for the help. Works perect now. Who would have thought it would be GUER and not Res :)

A quick related question to hiding radio msgs .. when west click on Alpha Radio; a msgs will say tropps moving to location etc etc with a hint box giving certain commands to west. The question is .. how do you do hide the text msg and hint box from the east players so only west get to see it? and vice versa?

Thank you very much.
Title: Re:Hiding Radio
Post by: Killswitch on 19 Nov 2004, 17:52:23
A quick related question to hiding radio msgs .. when west click on Alpha Radio; a msgs will say tropps moving to location etc etc with a hint box giving certain commands to west. The question is .. how do you do hide the text msg and hint box from the east players so only west get to see it? and vice versa?
If the text message and hint box is shown via a script that Radio Alpha starts, you would do this:
Code: [Select]
; Check to see that the player is a west dude. If not, just exit
?side player != west: exit

; Whatever Radio Alpha should do for west follows here

hint "Only west sees this"
Title: Re:Hiding Radio
Post by: CptBravo on 21 Nov 2004, 16:20:12
Thanks very much! Works perfect now :)