OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Alan34 on 23 Mar 2003, 16:05:04
-
What is the best way to limit radio use to the Group Leader?
-
I have a hazy recollection that only the group leader can use it anyway ...... is this a multiplayer question?
-
It is a MP mission and currently anyone can use the radio (others have to access it from Map/Radio) but still anyone can use it. I need to restrict it to Group Leader.
-
What happens when the radio call is activated? If you execute a script, then the script can check if the radio caller is the group's leader.
In your script, you can add the following code at the beginning:
? (leader player != player) : exit
This checks if the player (the unit causing the script to be executed) is the leader of his respective group. If not, then the script will exit.