Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

328 Excellent

About 7erra

  • Rank
    Gunnery Sergeant

Profile Information

  • Gender
  • Location

Contact Methods

  • Biography
    - 2012: ArmA2; Public domination, DayZ mod
    - 01.12.2013: Start of ArmA3
    - 06.01.2014: Joined the [IPT] ArmA3 clan, start of milsim "career"
    - March 2014: End of the IPT ArmA3 clan
    - End of 2014: Joined the 23. Luftlandekompanie [23LLK]
    - Middle 2015: Left the 23LLK for the 401PzGrenKp [401]
    - 01.04.1016: 401 joins the virtuelle Lehrbrigade 16 [L16] as PzGrenBtl 402 [402]

    Scripting for 5 years now. Learned by doing, didn't read one single scripting introduction. Not recommended - takes longer I guess.

Recent Profile Visitors

1773 profile views
  1. I just tested it and I have the opposite case. When I press a key it goes to the first entry. This is the class: class RscListNBox { idc = 1500; deletable = 0; fade = 0; access = 0; type = CT_LISTNBOX; rowHeight = 0; colorText[] = {1,1,1,1}; colorScrollbar[] = {0.95,0.95,0.95,1}; colorSelect[] = {0,0,0,1}; colorSelect2[] = {0,0,0,1}; colorSelectBackground[] = {0.95,0.95,0.95,1}; colorSelectBackground2[] = {1,1,1,0.5}; colorBackground[] = {0,0,0,1}; maxHistoryDelay = 1; soundSelect[] = { "", 0.1, 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)"; drawSideArrows = 0; columns[] = {0.001}; idcLeft = -1; idcRight = -1; class ListScrollBar: ScrollBar { }; style = ST_MULTI; shadow = 0; font = "RobotoCondensed"; sizeEx = GUI_TEXT_SIZE_MEDIUM; color[] = {0.95,0.95,0.95,1}; colorDisabled[] = {1,1,1,0.25}; colorPicture[] = {1,1,1,1}; colorPictureSelected[] = {1,1,1,1}; colorPictureDisabled[] = {1,1,1,1}; period = 1.2; x = 0; y = 0; w = 10 * GUI_GRID_W; h = 10 * GUI_GRID_H; class ScrollBar: ScrollBar { }; }; This is the script I wrote to test it: params ["_display"]; disableserialization; _listbox = _display displayCtrl 1500; _alphabet = "qwertzuiopasdfghjklyxcvbnm" splitstring ""; { for "_i" from 0 to 2 do {_listbox lnbaddrow [_x];}; } forEach _alphabet; lbsort _listbox;
  2. The control type is wrong. You are using 5 which is the normal listbox. What you are looking for is the ListNBox (type = 102): https://community.bistudio.com/wiki/DialogControls-ListBoxes#RscListNBox
  3. Yeah I messed something up in my code. I already have a fix ready but have to get back into coding again after such a long break 🙂 Technical explanation: There are different namespaces in which you can operate (missionNamespace, uiNamespace, profileNamespace and parsingNamespace). When declaring global variables they are saved to one of those namespaces. By default that is the missionNamespace. I am using global variables myself in the mod but need them saved in the uiNamespace. Thats why when you try to return a missionNamespace variable it will show up as undefined. You can still return a missionNamespace variable with the getVariable command: missionNamespace getVariable "TestVarGlobal";
  4. No need to add the killed eventhandler: // init.sqf addmissioneventhandler ["EntityKilled",{ params ["_killed", "_killer", "_instigator"]; if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0}; // UAV/UGV player operated road kill if (isNull _instigator) then {_instigator = _killer}; // player driven vehicle road kill if (_instigator != player OR !(_killed inArea your_trigger) OR !(_instigator inArea your_trigger)) exitwith {}; // Add your code here: _money = _instigator getVariable ["your_variable",0];// get the variable, if not defined use default (0) _money = _money + 500;//add kill reward _instigator setVariable ["your_variable", _money]; "You received 500$" remoteExec ["hint",_instigator];// execute code local on the pc of the killer }];
  5. Both bugs noted. I have some ideas why the problem might occur.
  6. The mission eventhandler is not bound to a single unit. It tracks every unit which is killed. You can check if a unit is inside of the trigger with the inArea command so the script could look like this: // init.sqf addmissioneventhandler ["EntityKilled",{ params ["_killed", "_killer", "_instigator"]; if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0}; // UAV/UGV player operated road kill if (isNull _instigator) then {_instigator = _killer}; // player driven vehicle road kill if (_instigator != player OR !(_killed inArea your_trigger) OR !(_instigator inArea your_trigger)) exitwith {}; // Add your code here: }]; You just have to name your trigger your_trigger.
  7. Anything that is available in the normal arsenal is also available in the shop so it does work with mods. I am not sure what you mean with adding classnames? Of course you have to manually add the content of the shop either by script or with my mod. Regarding the money system: VASS only includes the shop version of the arsenal but nothing more. You will need to use another money system (like the one from HoverGuy's Simple Shops). VASS allows you to interact with said money system through the TER_fnc_VASShandler function. Well addMissionEventhandler ("EntitiyKilled") together with a condition (inArea command) should work.
  8. Oh no. I think I know where that problem comes from. Will fix asap.
  9. 7erra

    Generic error in bis_fnc

    Yeah the example on the BIKI is wrong. The function has to be spawned: [1, "WHITE", 5, 1] spawn BIS_fnc_fadeEffect; I am going to correct it.
  10. 7erra

    Show Map Ingame

    Hmmm. Setting the commit time to 4 will take 4 seconds to even reach the position. It would probably be better to commit in one second and sleep for four.
  11. Not sure what you mean by that but if you want to execute a script (function) here's how to do it: You can make a function library just like in a description.ext. Here is an example from one of my mods: config.cpp (Full mod: https://github.com/7erra/VASS-Virtual-Arsenal-Shop-System/tree/VASS-3den-Mod) class CfgPatches { class TER_VASS { author="Terra"; name="Virtual Arsenal Shop System - 3den Editing"; url=""; requiredAddons[]={3den, A3_Ui_F}; requiredVersion=0.1; units[]={}; weapons[]={}; }; }; class CfgFunctions { class TER { class VASS { class vasscargo {file = "\VASS_3den\gui\scripts\fn_vasscargo.sqf";}; }; }; }; The file is located inside of the VASS_3den.pbo. Now I can call TER_fnc_vasscargo from anywhere inside of the game. Btw I use Mikero's Tools to pack my pbos because it works way better than with the A3 Tools one.
  12. 7erra

    Show Map Ingame

    How are you executing the code? Is suspension allowed?
  13. The addShop function is a local one so placing it in the init.sqf should be fine to guarantee JIP compability. For dynamically adding a shop you should remoteExec the function like this: [_seller,_sellerText] remoteExec ["TER_fnc_addShop",[0, -2] select isDedicated]; This way the action will only be added to players. If the server is a dedicated one and not a hosted one then the action is not added on the server (because it can't access it either way). Only execute this code from one instance, eg the server, because remoteExececing from the init.sqf is unneccessary network trafic and might lead to some problems when a new player joins. The addShopCargo function can be either local or global (and JIP compatible). The fourth parameter defines its behaviour. By default the cargo is shared across the network. I have to admit that I wasnt able to test the MP compability but I tried to put my theoretical knowledge to use.
  14. Errrr... Spot the difference: That's right: One works the other doesn't. (???) Here is the working one: disableserialization; //--- Using idcs to indentify your controls is fine when using the createDialog command but using displayCtrl is safer and in some cases the only option _display = findDisplay 3663;// Can also be replaced with the onLoad eventhandler as the first parameter is the display _listbox = _display displayCtrl 1500; //--- Add items to the listbox _recipeArray = ["Food Materials", "Raw Materials"]; // array of items in list { _listbox lbAdd _x; } forEach _recipeArray; //--- Add an eventhandler to the listbox that executes code when the user selects an entry _listbox ctrladdeventhandler ["LBSelChanged",{ params ["_listbox","_index"]; _ctrlPicture = (ctrlParent _listbox) displayCtrl 1200; _picture = ["images\1.paa","images\2.paa"] param [_index, ""]; _ctrlPicture ctrlSetText _picture; }];
  15. https://ace3mod.com/wiki/framework/arsenal-framework.html#21-adding-ace-arsenal-to-a-box _box addAction ["ACE Arsenal", { params ["_target", "_caller", "_actionId", "_arguments"]; [_target, _caller] call ace_arsenal_fnc_openBox; }];