Forum Jump :

Author Message

b1944  



Posts: 76
Rank:


Level: Member

Country: hu
Location:
Occupation:
Age:
In-game name:

 
#112206 Posted at 2011-09-27 07:57        
     
# Marbakka : Multiplayer

There are 36 players and all are named (p1 to p36)

I want to give p36 the ability to control certain elements of the mission via the Radio commands. Actually, truth be told, I'd like for p34 and p35 to be able to use the commands as well, but I'd settle for just limiting it to p36.

I create the trigger with 0 radius and Radio Alpha selected (and a text line, of course). In the 'On Act' field I have it executing a vehicle spawn script which has been tested and is working properly. The question is: How can I make this radio trigger usable only to this particular player slot?. I have tried all of the following condition lines and they have failed when tested. (either because everyone gets the ability or because no one gets the ability)


player == p36;

p36 in thislist;

player == p36 || player == p35 || player == p34;


I have also tried making the trigger itself available to all but with an if/then/else statement in the 'On Act'. It failed miserably.

Also, when I grouped the trigger to the unit in question, no one could even see the radio options anymore (it was as though they did not exist).

Any ideas?

The easiest way to make a radio trigger usable by only certain players is this:

1, You have a radio trigger but put NULL in its text field. (This way it will be "hidden" for all the players). It is activated by e.g. radio alpha.
2, You make a script (or a trigger) which starts with

if (player == X) then
{
1 setRadioMsg "The text you need";
You put the rest of the script or the trigger activation commands here if there are other things you need.
};

where X is the name of the player you want to be able to use the radio trigger.

This way the radio option becomes "unhidden" for a particular player only and you can have different radio commands available for different players.

If you use the if command as decribed above you can also make sure that a particular script runs on one computer only. It's useful in multiplayer games. For example, I made a mortar support script which is usable by one player only.

If you have any question just ask as I have just spent several hours trying to figure out how to do that.

This post was edited by b1944 (2011-09-29 07:24, ago)