OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: MBlazerGuy on 10 Feb 2004, 14:07:01

Title: Radio help! Can different options be available for different players?
Post by: MBlazerGuy on 10 Feb 2004, 14:07:01
I think from previous messages that I've read that this isn't possible, but I have to ask...
I'd like to create a mission that splits the radio responsabilities between the players.
For example, player #1 would be responsible for calling in Air Strikes, while player #2 would be responsible for calling in para-troops re-enforcements.  And you would know your responsabilities at the start of the mission, based on which group leader you selected to join as.
Also, if a specific player activates a script by a radio action, is there a way the server can tell who it was who called in the strike, to get the appropriate strike coordinates from the correct player?
Thanks!
Title: Re:Radio help! Can different options be available for different players?
Post by: Wildebeest on 13 Feb 2004, 09:17:58
Hmmm.... in the init.sqs I think you can specify which radio commands will be visible to different players.

?!(player == playerName): 0 setRadioMsg "NULL"
?!(player == playerName): 1 setRadioMsg "NULL"
?!(player == playerName): 2 setRadioMsg "NULL"
?!(player == playerName): 3 setRadioMsg "NULL"
?!(player == playerName): 4 setRadioMsg "NULL"
?!(player == playerName): 5 setRadioMsg "NULL"

That means that if you are not player playerName you won't be able to see those commands. However... I don't think you can have two or more players share the same command number in the list. But of that I'm not certain.
I would give the first, say three numbers, to the first player and the three next to the second player.

Regarding what you asked about a specific player activation a script by radio command, you could make the script run different sections by checking who has activated it:

?(player == playerName1): goto "playerName1stuff"
?(player == playerName2): goto "playerName2stuff"

I might be wrong about all this though.
This is just stupid suggestions from a stupid n00b but I hope some of it helps  ;D 8)

Title: Re:Radio help! Can different options be available for different players?
Post by: MBlazerGuy on 13 Feb 2004, 11:28:41
Thanks Wildebeest.

After reading other replies to similar topics, I've decided to take the route of the AddAction method, instead of using the Radio.

It just looks like the Radio commands were never designed to be used in multi-player situations.

The AddActions seem to be working well for me, as they can be uniquely defined for each player.

Thanks, again.  Doug
Title: Re:Radio help! Can different options be available for different players?
Post by: Wildebeest on 13 Feb 2004, 14:25:56
However, it is possible to use them in multiplayer. I use them in one of my Vietnam missions. :)
Title: Re:Radio help! Can different options be available for different players?
Post by: MBlazerGuy on 14 Feb 2004, 01:38:33
Would you be willing to share the source code of this mission?   ;D