Jump to content
Sign in to follow this  
the unknown

Radio command mp

Recommended Posts

Heres the problem i am makeing a time machine like ting and got everyting to work except for the fact that every groupleader can use it.

this is for a training map so i want to have only 1 person being able to use it.

so is there a way to limit the radio (0-0-#) to only certained people?

Thanks in advance

The Unknown

P.S. i saw how to do it some where on this forum but i cant find it if any1 knows where it is please post a link.

Share this post


Link to post
Share on other sites

Put the command:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">showRadio FALSE

in your init.sqs

Then you have to decide which player you want to see the radio. Lets say it is the leader of a group named grp1.

Put the following line also in your init.sqs after the previous line.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (leader grp1 == player) then {showRadio TRUE}

Share this post


Link to post
Share on other sites

No, don´t follow Mr. Peanuts advice (because it doesn´t work). Do it this way:

Lets say you have two radiotriggers (Alpha and Bravo) and wants the first one to be availiable only for west and the second one for east.

In init.sqs you write:

?(side player == west): 2 setRadioMsg "NULL"

?(side player == east): 1 setRadioMsg "NULL"

Now west can only see and use Radio Alpha, East can only see and use Radio Bravo.

If it´s a coop MP game, and all your group leaders are on the same side you do it this way...

?(player != leader group1): 1 setRadioMSG "NULL"

Thus, the Alpha Chanel will only be availiable for the player who is team leader of the group named group1

EDIT: The command RadioEnable does not exist, all you do with Peanuts example is to create a global variable named radioEnable and set it to true, but it doesn´t do anything. There is, however, a variable named enableRadio that´s toggled with true or false, but that will disable the radio for everyone.

Share this post


Link to post
Share on other sites

<s>Okay, I meant enableRadio, not radioEnable. enableRadio is a command according to the comref.

I stand by my (corrected) example which will enable the radio only on the machine on which the player is the leader of the group, and is a less kludgy solution.</s>

Share this post


Link to post
Share on other sites
I stand by my (corrected) example which will enable the radio only on the machine on which the player is the leader of the group, and is a less kludgy solution.

I agree it's simpler. But I have never tested it in MP. Are you sure enableRadio can be run localy on each machine?

EDIT: and it will also remove the intercom orders between soldiers in the group. But if that´s ok...

Share this post


Link to post
Share on other sites

Man,

I am way off my game this morning!

I meant showRadio not enableRadio....

Ack!

I have corrected my first post above. Please ignore my second post.  I am 100% certain that showRadio is local only.

Share this post


Link to post
Share on other sites

smile_o.gif Well, I have mornings like that too...

But it opens a possibility I've never thought of. I suppose this means that showMap is also a local setting, thus it would be possible to make individual players "drop" their map in a MP game, right?

EDIT: Does showRadio also remove the radio commands that you run with the numerical keyboard, or only the radio icon in the map section???

Share this post


Link to post
Share on other sites

Yes, all show commands work locally. It opens up possibilities for having a map,compass,watch or GPS shown only for players you want to see them.

EDIT showRadio only removes the Alpha, Bravo etc radio channels.  The radio will also not be shown on map screen.

Share this post


Link to post
Share on other sites

can you give me a piece of code on how to use the showradio command?

i also tink that nominesine's way isnt very handy when you use the triggers as i do.

the trigger makes a Variable true.

then the script will run the script that changes the time and it will put the Variable false again in this way i can get more then 10 radio commands and a full day cycle.

tnx for the help so far.

The Unknown

forgot this:

i got a back and next function so the radiomessages will change all the time.

Share this post


Link to post
Share on other sites

nope doesnt work this is the init.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "mainscript.sqs"

showRadio FALSE

if (leader grp1 == player) then {showRadio TRUE}

exit

the mainscript ting is the mainscript of the timers where all the actions will happen.

some how i will still be abel to use the radio whit a diffrent unit.

The Unknown

Share this post


Link to post
Share on other sites

You need to define showRadio in the description.ext, before you can make any changes in init.sqs. This is the first lines in one of my working MP-missions:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

onloadmission=" "

showCompass=1;

showGPS=0;

showMap=0;

showNotepad=1;

showWatch=1;

debriefing=1;

respawn="group";

Include the same, otherwise the toggling between true/false wont work. This means that the player start with a compass, he can read the notes in the briefing, but he will not be able to see the map, unless I give the command showMap true during the mission.

Share this post


Link to post
Share on other sites

<s>Ooops.

Put the code in one time trigger instead that activates as soon as the mission starts. You are correct. Putting it in the init.sqs will not work.</s>

I give up....

Share this post


Link to post
Share on other sites

well

its kinda working i tryed that first way nominesine suggest and it works so far ill start MP testing the stuff later tnx guys.

The Unknown

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×