Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Posts posted by riouken

  1. Well I think steam just adds another layer to modded games. It does not make it easier as can be seen in any Arma help forum. The vast majority of problems people post come back to users with steam installs and trying to get them to run with mods. And thats with just the way we have steam now.

    I will hold my final judgement untill we get some more answers to questions like these:

    Is steam work shop going to be optional?

    Can addons be released outside of the workshop?

    If you can release out side of SWS is this going to cause the server running these mods to be de-listed or listed in the steam browser as un-official?

    How is multi-player testing going to be done with mods in development.

    How are mods like (Acre,jayarma2lib,arma2dotnet...) going to be treated?

    Will we be able to have private mods? And still play on public servers?

    What about client side only mods?

    I would like to know a lot more...

  2. You need to use a ui eventhandler that is assigned to the listbox control.

    That EH will call a function

    In that function, take the LB selection, then use that data to update the rest of the controls on your dialog.



    Remember ui EH are destroyed when the dialog closes, use the onLoad event in your dialog to create the EH each time the dialog is opened.

    Also remember to use:


    At the top of your function, as you can not update ui components without running that command.

  3. this is not tested but it should be pretty close, I may have made a small error here or there, but you get the picture.

    Put in your script before you change player:

    _weparray = weapons player;
    _mags = magazines player;
    _backpack = typeOf unitBackpack player;
    _WeaponsRuckList = getWeaponCargo unitBackpack player;
    _MagazinesRuckList = getMagazineCargo unitBackpack player;
    _gearArray = [_weparray,_mags,_backpack,_WeaponsRuckList,_MagazinesRuckList];
    player setVariable ["savedGear",_gearArray];

    Then put this in the script after you change:

    _oldGear = player getVariable "savedGear";
    _wepons = _oldGear select 0;
    _mags = _oldGear select 1;
    _backpack = _oldGear select 2;
    _wepsbackpack = _oldGear select 3;
    _magsbackpack = _oldGear select 4;
    removeAllItems player;
    removeAllWeapons player;
    removeBackpack player;
    {player addMagazine _x;} forEach _mags;
    {player addWeapon _x;} forEach _wepons;
    {player addWeapon _x;} forEach _wepons;
    if (count _backpack > 0) then {
       player addBackpack (_backpack select 0);
       if (count _wepsbackpack > 0) then {        
           {(unitBackpack player) addWeaponCargo [_x,1];} forEach _wepsbackpack;
       if (count _magsbackpack > 0) then {
           {(unitBackpack player) addMagazineCargo [_x,1];} forEach _magsbackpack;
    // This will make sure the correct muzzle is selected on your weapon.
    firstmuz = {
      private "_ma";
      _ma = getArray (configFile >> "CfgWeapons" >> _this >> "muzzles");
      if (_ma select 0 != "this") exitWith {_ma select 0};
    _primary = primaryWeapon player;
    if (_primary != "") then
      player selectWeapon (_primary call firstmuz);

    ---------- Post added at 08:50 PM ---------- Previous post was at 08:47 PM ----------

    If you use ACE then you will have to change the backpack stuff a little, but if you need help with that just let me know.

  4. Save the old class name to the player namespace, then you can retrieve it dynamically.

    [color=#0000BB][font=monospace]_classname [/font][/color][color=#007700][font=monospace]= [/font][/color][color=#0000BB][font=monospace]typeOf player[/font][/color][color=#007700][font=monospace];
    player setVariable ["myOldClass", [/font][/color][color=#0000BB][font=monospace]_classname];[/font][/color]

    then later in your script that sets it back:

    _myoldClass = player getVariable [color=#007700][font=monospace]"myOldClass";[/font][/color]

  5. Try this:

    class IceBaseLB
    [color=#ff0000]     style=LB_TEXTURES;[/color]
        font = "Bitstream";
        columns[] = {-0.01,1,0.7}; 
        drawSideArrows = 0; 
        idcLeft = -1; 
        idcRight = -1; 
        colorText[] = {1,1,1,1};
        colorScrollbar[] = {1,1,1,1};
        colorSelect[] = {0,0,0,1};
        colorSelect2[] = {1,0.5,0,1};
        colorSelectBackground[] = {0.6,0.6,0.6,1};
        colorSelectBackground2[] = {0.2,0.2,0.2,1};
        colorBackground[] = {1,1,1,1};
        maxHistoryDelay = 1.0;
        soundSelect[] = {"",0.1,1};
        period = 1;
        autoScrollSpeed = -1;
        autoScrollDelay = 5;
        autoScrollRewind = 0;
        arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
        arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
        shadow = 0;
            class ScrollBar
             color[] = {1,1,1,0.6};
             colorActive[] = {1,1,1,1};
             colorDisabled[] = {1,1,1,0.3};
             thumb = "#(argb,8,8,3)color(1,1,1,1)";
             arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
             arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
             border = "#(argb,8,8,3)color(1,1,1,1)";
             shadow = 0;

    Try the style as either:

    style = LB_TEXTURES;


    style = LB_MULTI;;

  6. PARAMS is a CBA macro


    The other one is a type of macro as well, though I'm not sure from where. Maybe domination.

    To op, I'm pretty sure you copied that from somewhere, please post the whole code as you have it in your mission, or just search the forum for one of the working examples, this has been answered a lot here.

  7. Your algorithm also has a logic error. It will never select the last item, ie when you have 1 left. It will just skip over that one.

    private ["_target", "_actionname", "_actionsarray", "_actionid"];                     
    _target = _this select 0;                         // object or vehicle or player the action will be removed from 
    _actionname = _this select 1;                       //String. Name of the action, visible when you have the action
    _actionsarray = player getVariable "ActionsArray";        //checks the array of available actions for that object
    if (_actionname in _x)  then                         //finds the action name in the main array
           //_x = _actionsarray select 0;
        // [color=#ff0000][b]This line should be at the end of your function, what happens when _x is 1 and this line runs before your if check below? The way it is now it will never work for the last element.[/b][/color]
        _x set [2, (_x select 2) - 1];                //remove 1 from the number of actions of this type remaining
       if (_x select 2 != 0) then                     //if 0 actions of this type remaining
           _actionid = _x select 0;                //gets the ID of the action
           _actionsarray set [_actionid, -1];                    
           _actionsarray = _actionsarray - [-1];        //removes the action from the array
           _target removeAction _actionid;            //removes the action from the target
            hint str _actionsarray;
    } forEach _actionsarray; 

  8. These commands are used to access parts of the config. You use the correct command depending on what you want to retrieve.

    Here is the config I used in the example:


    // getText
    // Use this command to get an item that is stored in the config as text.
    _text = getText (configFile >> "CfgWeapons" >> "M4A1" >> "displayname");
    // getArray
    // Use this command to get an item that is stored in the config as an array.
    _array = getArray (configFile >> "CfgWeapons" >> "M4A1" >> "modes");
    // getNumber
    // Use this command to get an item that is stored in the config as an number or integer.
    _number = getNumber (configFile >> "CfgWeapons" >> "M4A1" >> "value");

    You use the is commands to check what the return result is, if you do not know what it will return or if it is there.

    // Use to check if the class is defined.
    if (isClass(configFile >> "CfgPatches" >> "ace_main")) then
        ///... do some stuff is ACE is running(Could check for any addon or config entry.
    } else
       // .... Do something else.
    // Use to check if that is the data type...
    _ok = isArray (configFile >> "CfgWeapons" >> "M4A1" >> "drysound");
    if (_ok) then { hint "We Have sounds when we run the weapon dry.";};

  9. First, what map are you using this code on? The BIS maps and IceBreakers maps all use map locations, but other custom maps are hit and miss, these must be defined in the map.(They can be created on the fly, but its a lot of work if your creating a lot.).

    Second please post your code so we can see that you are selecting and using the location properly.

  10. No you can not change much about the built in function, but you can build your own Dialog or Resource with your own custom specs.


    Here is an example from some of my work:

    class controls {
    	class videobkgrd: cms_RscPicture
    		idc = 1201;
    		text = "cms_sys\gui\EKG_Trial2_0.OGG";
    		autoplay = 1;
    		loops = 1000;
    		x = 0.420312 * safezoneW + safezoneX;
    		y = 0.30875 * safezoneH + safezoneY;
    		w = 0.215313 * safezoneW;
    		h = 0.310926 * safezoneH;
    	class RscButton_1600: cms_RscButton
    		idc = 1600;
    		x = 0.729102 * safezoneW + safezoneX;
    		y = 0.2875 * safezoneH + safezoneY;
    		w = 0.0502084 * safezoneW;
    		h = 0.0303703 * safezoneH;
    	class RscButton_1601: cms_RscButton
    		idc = 1601;
    		x = 0.739062 * safezoneW + safezoneX;
    		y = 0.3725 * safezoneH + safezoneY;
    		w = 0.0252084 * safezoneW;
    		h = 0.0424073 * safezoneH;

  11. That fire mission is all kinds of wrong, take a look at the wiki.

    If you dont want to pre-place static battery's then use the virtual's:



    Here is a arty template from one of my systems. It includes some stuff to talk back to the caller.

    // Bluecom Interface , By Riouken
    if (!isServer) exitWith {};
    _pos = _this select 0;
    _batt = _this select 1;
    _ordtyp = _this select 2;
    _rtoffire = _this select 3;
    _roundcount = _this select 4;
    _firemission = ["IMMEDIATE", _ordtyp, _rtoffire, _roundcount];
    _artyveh = "Can_small" createVehicle [_pos select 0, _pos select 1,0];
    _artytargetpos = getPosASL _artyveh;
    _artyavalibile = [_batt, _firemission] call BIS_ARTY_F_Available;
    _artyviable = [_batt, _firemission] call BIS_ARTY_F_StillViable;
    _artyposinrange = [_batt, _artytargetpos, _ordtyp] call BIS_ARTY_F_PosInRange;
    if ((_artyavalibile) and (_artyviable)) then {
       if (_artyposinrange) then {
           [_batt,_artytargetpos,_firemission] call BIS_ARTY_F_ExecuteTemplateMission;
       } else {
           [nil,bluecom,"loc",rHINT,"Bluecom, can not fire on that location"] call RE;
           [nil,bluecom2,"loc",rHINT,"Bluecom, can not fire on that location"] call RE;
    } else { 
       [nil,bluecom,"loc",rHINT,"Bluecom, Battery is not available"] call RE;
       [nil,bluecom2,"loc",rHINT,"Bluecom, Battery is not available"] call RE;
    if (artybattery getVariable "ARTY_BADTARGET") then {
       [nil,bluecom,"loc",rHINT,"Can not target that!"] call RE;
       [nil,bluecom2,"loc",rHINT,"Can not target that!"] call RE;
    waitUntil {_batt getVariable "ARTY_ONMISSION"};
    [nil,bluecom,"loc",rHINT,"Bluecom, Artillery is prepairing to fire"] call RE;
    [nil,bluecom2,"loc",rHINT,"Bluecom, Artillery is prepairing to fire"] call RE;
    deleteVehicle _artyveh;
    waitUntil {_batt getVariable "ARTY_SHOTCALLED"};
    [nil,bluecom,"loc",rHINT,"Bluecom,  Artillery is firing!"] call RE;
    [nil,bluecom2,"loc",rHINT,"Bluecom,  Artillery is firing!"] call RE;
    waitUntil {_batt getVariable "ARTY_SPLASH"};
    [nil,bluecom,"loc",rHINT,"Bluecom,  Artillery is splashing down!"] call RE;
    [nil,bluecom2,"loc",rHINT,"Bluecom,  Artillery is splashing down!"] call RE;
    waitUntil {_batt getVariable "ARTY_COMPLETE"};
    [nil,bluecom,"loc",rHINT,"Bluecom, Artillery mission is complete!"] call RE;
    [nil,bluecom2,"loc",rHINT,"Bluecom, Artillery mission is complete!"] call RE;