Jump to content

donelsarjo

Member
  • Content Count

    193
  • Joined

  • Last visited

  • Medals

Everything posted by donelsarjo

  1. donelsarjo

    fix array

    and consider putting the position correction into "if (_cityType in _cityTypes) then { /*position correction*/ _cities pushBack _cityPos}; ". No need to waste CPU usage.
  2. donelsarjo

    Local AI Voices

    0 fadeRadio 0; ???
  3. Maybe somebody should make a ticket for it. And please delete the post, if I am changing stuff I am not suppored to change...
  4. unfortunately it is not possible for the module if you don't won't to write a config for it. Here is why: taken from fn_strategicmapopen.sqf bis_fnc_mapSize returns -1 on almost all non vanilla maps ... (strangly on VR, too) BUT, if you know your way around you can copy fn_strategicmapopen.sqf, replace _mapSize = [] call bis_fnc_mapSize; // line 80 with _mapSize = worldSize; RscDisplayStrategicMap_scaleMin = _scale; // line 93 RscDisplayStrategicMap_scaleMax = _scale; // line 94 RscDisplayStrategicMap_scaleDefault = _scale; //line 95 with RscDisplayStrategicMap_scaleMin = 0; RscDisplayStrategicMap_scaleMax = 1; RscDisplayStrategicMap_scaleDefault = _scale; make it into a function and [stuff] call IMPROVED_BIS_fnc_strategicmapopen. StrategicMapOpen Don't forget the 8th parameter ,which is the default scale. Now everything works. At least it does for me on PR Fata.
  5. vehicle addEventHandler["killed",{ (_this select 1) addRating -10000}]
  6. donelsarjo

    fix array

    not pritty but it works
  7. donelsarjo

    fix array

    _cities = []; _locations = configfile >> "CfgWorlds" >> worldName >> "Names"; _cityTypes = ["NameVillage","NameCity","NameCityCapital","NameLocal"]; for "_x" from 0 to (count _locations - 1) do { private["_cityPos","_cityType"]; _randomLoc = _locations select _x; _cityPos = getArray(_randomLoc >> "position"); _cityType = getText(_randomLoc >> "type"); if(typeName(_cityPos select 0) == "String") then { _cityPos = [call compile (_cityPos select 0),call compile (_cityPos select 1)]; }; _posX = floor (_cityPos select 0); _posY = floor (_cityPos select 1); _rstX = _posX%50; _rsty = _posY%50; _posX = (50 - _rstX) + _posX; if (_posX%100 == 0) then {_posX = _posX + 50}; _posY = (50 - _rstY) + _posY; if (_posY%100 != 0) then {_posY = _posY - 50}; _cityPos set [0, _posX]; _cityPos set [1, _posY]; if (_cityType in _cityTypes) then { _cities pushBack _cityPos; }; }; _cities /* { _mrk = createMarker [format ["%1",str _x] , _x]; _mrk setMarkerShape "ICON"; _mrk setMarkerType "mil_dot"; }foreach _cities; */ sorry now they are dead center (at least on chernarus)
  8. in singleplayer playableunits = []; use switchable units in multiplayer playableunits = [ unit_1 , unit_2 etc] and switchableunits = []; just use unitlist = playableunits + switchableunits
  9. donelsarjo

    fix array

    edited my post
  10. donelsarjo

    fix array

    this will propably only work if you do it manualy. The center of a city name is defined in the config. But if you see a pettern in the positions you could do this. E.g. the positions are always off a certain vector. if you want the positions to be exact in the middle of a square on the map you coud use "modulo". % _nbr = floor (_pos select 0); // _pos = [2915.2,6164.52] -> _nbr = 2915 _rest = nbr%50; // _rest = 15 <- look up the right syntax plz _nbr = (50 - _rest) + nbr; //2950 _nbr ist the first index of your position array _pos with floor you get an integer number _rest is the rest that remains when you devide _nbr / 50 . e.g 55%3 = 1, or 34%2 = 0 now we define the new number _nbr with (50 - _rest) + the old number _nbr now you can do this for the next index of _pos
  11. donelsarjo

    fix array

    and since you are using parts of "SL_fnc_urbanAreas" you could add this line so strangely coded positions are fetched, too (e.g. for PR Fata sometimes position like ["3454,24 + 2342,34", "2343.23 + 2324.23"] occure) _cityPos = getArray (_randomLoc >> "position"); if (typeName (_cityPos select 0) == "String") then { _cityPos = [call compile (_cityPos select 0), call compile (_cityPos select 1)]; };
  12. I had the same problems. I think it is Leight's Opfor Pack. I've removed it and no crashes since.
  13. donelsarjo

    fix array

    try this
  14. donelsarjo

    attatchto after respawn help

    In the Respawn module there is a blank text field for code to run on the respawned vehicle. If you select force Respawn then the code is run at the beginning of the mission.
  15. donelsarjo

    Map id finder?

    Precise method: You could use X-Cam and hover the mouse over the object you want it's ID from. Try and Error method: Or use nearestObjects The second number is the ID.
  16. donelsarjo

    hideObject

    https://community.bistudio.com/wiki/hideObjectGlobal
  17. donelsarjo

    ArmA 3 Ticket System

    call BIS_fnc_showMissionStatus; this gets you a small number on the right upper side of the screen. Biki Link
  18. donelsarjo

    Add killed eventhandler

    well the problem might be that you are running sleep in unschedualed environment. try to spawn it.
  19. donelsarjo

    Just came back to A3 - Disappointed

    I would have taken the time for writing this nonsense post to adjust the game according to my preferences. Every single point can be "fixed" (lol) by simply starting a mod or adjust settings. Be happy you have the liberty to do so. And if you are still unsatisfied play a better game. Good luck finding one.
  20. donelsarjo

    Link Task to group

    As the Biki states it : the first Parameter is the object, group or side the task should be given to: Example side : [civilian,["task1"],["Do this and you get a cookie","Earn Cookie","cookiemarker"],[0,0,0],1,2,true] call BIS_fnc_taskCreate For the module Owner : BLUFOR/OPFOR/CIVILIAN/INDEPENDENT or Sides of synchronized units Example group: [(group player),["task1"],["Do this and you get a cookie","Earn Cookie","cookiemarker"],[0,0,0],1,2,true] call BIS_fnc_taskCreate For the module: Owner : Group of synchrinized objects (sync with leader) Example object: [player,["task1"],["Do this and you get a cookie","Earn Cookie","cookiemarker"],[0,0,0],1,2,true] call BIS_fnc_taskCreate For the module: Owner : Synchronized objects only
  21. donelsarjo

    Link Task to group

    Create a marker of any size. Give it a name (e.g,: "mrk"). Create a trigger the same size as the marker and place it exactly over it. TRIGGER Type: NONE Activiation: ENEMY SIDE Repeatedly Present Conditon: this ON ACT. "mrk" setMarkerColor "ColorEast"; ON DEA. "mrk" setMarkerColor "ColorGuer";
  22. try : _cowabanga = [this] spawn { (_this select 0) allowDamage false; waitUntil { (getPosATL (_this select 0)) select 2 < 2}; (_this select 0) allowDamage true;};
  23. donelsarjo

    _this select and _x

    damn you Tankbuster, you have been faster :D
  24. donelsarjo

    _this select and _x

    1. my_fnc_add = 2. { 3. _a = _this select 0; 4. _b = _this select 1; 5. _c = _a + _b; 6. hint c; 7. }; 8. [45,3] call my_fnc_add; 9. //at the upper right corner you see 48 Look at that example. I have made a function called my_fnc_add. This function expects an array with two variables. So when I call it (line 9.) I have to pass two parameter "[45,3]". Now the function gets the array you passed. You can address it by "_this" (only inside the function). So in "my_fnc_add", "_this" contains the array "[45,3]". Now we want to add those two numbers(line 5.). To do so, we have to select the first number in the array by using "_this select 0". Now "_this select 0" contains 45. We store it in the variable "_a" for better readabilitry. The same goes for the second number using: "_this select 1". The function would also work using hint ( _this select 0 + _this select 1). But it is harder to read. "...but what I don't understand is what it has to do with "_target, _caller and _object (I think)" In your example there is propably some function passing/expecting three variables in an array. That's it. When you look at the biki you will find a description what _target, _caller and _object or some other variables should be for the function you use. When you use e.g. "addaction" is passes three variables in an array to a script you launch (_object,_caller,_id). In this script you can refere to them like this: _obj = _this select 0; <- this is the object the addaction is attached to (you can also call it _a, _lol, _pinguin or just _obj) _caller = _this select 1; <- this is the guy who used the action _id = _this select 2; <- this is a number the action gets, so you can remove it using: _obj removeAction _id; You get the information about what a function expects and what is returns by reading the biki. I didn't quite understand what "_x" does as well The "_x" is mainly used in a foreach loop. 1. _array = [1,2,3,4,5]; 2. {_x = 0} foreach _array; 3. hint _array; 4. //at the upper right corner you see [0,0,0,0,0] foreach expects an array. It loops through all entires of the array. In each loop it saves an entry in _x. In this example in the first loop it takes the number "1" and saves it in "_x". Then it redefines "_x" as "0" and puts it back in the array. In the second loop it takes the number "2" and so on. That's what "_x" is mainly used for. I hope I have answered your question.
×