Jump to content
Sign in to follow this  
xPaveway

Limit radio trigger to one side only

Recommended Posts

Just a quick question, wondering if anyone else has had trouble with this. I've been playing around with the editor, testing various things, making sample missions etc.

I was playing around with radio triggers but I noticed that I can activate the radio trigger from multiple sides. As long as the character has a radio, doesn't matter if they are BLUFOR, OPFOR, or civies, they all have the option to activate the radio trigger in the 0-0 menu.

Is there a way to make it only available to one side or one unit/group?

Share this post


Link to post
Share on other sites
The way I did it was adding this to init.sqf:

switch (side player) do
{
case west:
{
1 setRadioMsg "Radio Message Here";
2 setRadioMsg "NULL";
};
case east:
{
2 setRadioMsg "Radio Message Here";
1 setRadioMsg "NULL";
};
};

For specifics: http://community.bistudio.com/wiki/Main_Page

I came across this in my screen, exactly what im looking for. However i get an error saying

Error in expression <side player) do
{
case west:
{

};
case Guer:
{
1 setRadioMsg "NULL";
};
};>
 Error position: <Guer:
{
1 setRadioMsg "NULL";
};
};>
 Error Undefined variable in expression: guer

It doesnt seem to like guer as a side, yet its mentioned many times in the wiki regarding sides. The side is actually Guerilla side who are allies with the west, but in the editor ive changed it to enemy to everyone.

What is wrong here?

Share this post


Link to post
Share on other sites
http://community.bistudio.com/wiki/Side

http://community.bistudio.com/wiki/resistance

The string is "GUER" but the actual variable is resistance (I.E. variable resistance = "GUER") So use resistance in your case statements.

Thanks for your fast reply Paveway. It fixed my problem and also with a hidemarker script which had a similar problem, so both are working :)

I had tried using a hint format to tell me what side the Guerillas where on and it came back with Guer, that is what threw me off.

Thanks again!

Share this post


Link to post
Share on other sites

Np, even the wiki says

When used in a format statement (hint format["%1",resistance]), the string returned is "GUER".

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  

×