Jump to content
Sign in to follow this  
MFG4Ever

ACRE 2 possible translator role

Recommended Posts

In my group we're trying to build a small mission, in which we'll need a translator. Actually we'd like to have the role on a more permanent basis, if our initial mission pans out.

 

So far, while playing around with ACRE2, we've yet to have any luck in assigning Babel language to a single role. We do not intend for everyone to be able to switch between Babel languages. As our mission framework is based mainly on F3 framework, we work with roles defined called via a function in an unit's init.

 

It seems however, that the code we've composed, is either being overwritten by the ACRE 2 init, or simply is wrong. Most likely it is wrong, but right now, we're having trouble seeing exactly where we went wrong. 

Hopefully someone in the Arma community, can shed some light into whether or not it is possible, to actually limit the Babel language to only one role/player.

 

Here's our code, which we've tried running both as part of a loadout script (based on roles) and as a separate script, after ACRE inits.

waitUntil{[] call acre_api_fnc_isInitialized};
if (_typeOfUnit == "int") then 
	{
    ["english","greek","farsi"] call acre_api_fnc_babelSetSpokenLanguages;
    };

int is the name of the role.

 

Running the ["english","greek","farsi"] call acre_api_fnc_babelSetSpokenLanguages; as an exec command from the debug works fine. Which makes us even more sure, that we're missing something somewhere.

Share this post


Link to post
Share on other sites
    [[west, "English"],[east, "Russian"],[independent, "English", "Russian"],[civilian, "English", "Russian"]] call acre_api_fnc_setupMission;
    ["en", "English"] call acre_api_fnc_babelAddLanguageType;
    ["ru", "Russian"] call acre_api_fnc_babelAddLanguageType;

    if (hasInterface) then {
        switch ( side (group player) ) do {
            case west: {
                ["en"] call acre_api_fnc_babelSetSpokenLanguages;
            };
            case civilian: {
                ["en","ru"] call acre_api_fnc_babelSetSpokenLanguages;
            };
            case east: {
                ["ru"] call acre_api_fnc_babelSetSpokenLanguages;
            };
            case independent: {
                ["en","ru"] call acre_api_fnc_babelSetSpokenLanguages;
            };
        };
    };

Is what I use to set up babel.

That means you should certainly be able to use acre_api_fnc_babelSetSpokenLanguages to get what you want.

 

if ((str player)=="int") then {

["en","ru"] call acre_api_fnc_babelSetSpokenLanguages;

};

would definitely suffice. Just put it at the end of your mission's init (and make sure that acre_api_fnc_setupMission is called before that). I didn't know there is a farsi language defined though.

Share this post


Link to post
Share on other sites

Thanks.

 

Well we have different languages set up, and Babel working for INDEP side, as they sometimes are allies, and sometimes not.

The farsi bit is something you can define on your own, since ACRE doesn't use "real" languages AFAIK. So you can, by theory, set it to Martian ;-) But this is just my theory, from what I've read on the ACRE wiki.

 

But I'll have a look at your suggestion for the individual part. It seems we're headed in the right direction, we just need it to be called after the main ACRE init.

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  

×