Jump to content

Antman2o1o

Member
  • Content Count

    40
  • Joined

  • Last visited

  • Medals

Everything posted by Antman2o1o

  1. Hey, folks super stuck here maybe one of you Arma Dev Gods can help finish this off. PURPOSE OF CODE: I am trying to build a mini-map like in the game Squad. So you don't have to come out of the game to check your map. WHY: This would be extremely helpful to folks who are flying in jets so they don't crash when they come out of the game to check their map. I have most of the map working to include positioning. I just can't figure out how to create an open and close feature to call the map. I am not sure how to bind a key to open or close the map. There is also a map line marker error I can't figure out as well. So maybe someone with more skill can finish this out and share the code. THOUGHTS: This would have to work multiplayer for each faction player. Maybe triggered from onPlayerRespawn.sqf Credit Goes To Larrow for map code Any help highly appreciated ANT CODE BELOW: init.sqf fnc_updateMiniMap = { _map = _this select 0; _map ctrlMapAnimAdd [0, 0.05, player]; ctrlMapAnimCommit _map; }; waitUntil { time > 0 }; //Show MiniMap ( [ "myMiniMap" ] call BIS_fnc_rscLayer ) cutRsc [ "myMap", "PLAIN", 1, false ]; _____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ description.ext #include "basedefines.hpp" class RscTitles { #include "minimap.hpp" }; _________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ minimap.hpp class myMap { idd = 20000; duration = 1e10; fadein = 0; fadeout = 0; class controlsBackground { class theMiniMap : RscMapControl { idc = 38555; type = 101; style = 48; moveOnEdges = 0; x = 0.2 * safeZoneX; y = 0.2 * safeZoneY; w = 0.6 * safeZoneW; h = 0.6 * safeZoneH; widthRailWay = 1; onDraw = "_this call fnc_updateMiniMap"; }; }; }; ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ basedefines.hpp /////////////////////////////////////////////////////////////////////////// /// Styles /////////////////////////////////////////////////////////////////////////// // Control types #define CT_MAP_MAIN 101 #define ST_PICTURE 48 /////////////////////////////////////////////////////////////////////////// /// Base Classes /////////////////////////////////////////////////////////////////////////// class RscMapControl { moveOnEdges = 0; shadow = 0; ptsPerSquareSea = 5; ptsPerSquareTxt = 20; ptsPerSquareCLn = 10; ptsPerSquareExp = 10; ptsPerSquareCost = 10; ptsPerSquareFor = 9; ptsPerSquareForEdge = 9; ptsPerSquareRoad = 6; ptsPerSquareObj = 9; showCountourInterval = 0; scaleMin = 0.001; scaleMax = 1.0; scaleDefault = 0.16; maxSatelliteAlpha = 0.85; alphaFadeStartScale = 2; alphaFadeEndScale = 2; colorBackground[] = {0.969,0.957,0.949,1.0}; colorText[] = {0,0,0,0}; colorSea[] = {0.467,0.631,0.851,0.5}; colorForest[] = {0.624,0.78,0.388,0.5}; colorForestBorder[] = {0.0,0.0,0.0,0.0}; colorRocks[] = {0.0,0.0,0.0,0.3}; colorRocksBorder[] = {0.0,0.0,0.0,0.0}; colorLevels[] = {0.286,0.177,0.094,0.5}; colorMainCountlines[] = {0.572,0.354,0.188,0.5}; colorCountlines[] = {0.572,0.354,0.188,0.25}; colorMainCountlinesWater[] = {0.491,0.577,0.702,0.6}; colorCountlinesWater[] = {0.491,0.577,0.702,0.3}; colorPowerLines[] = {0.1,0.1,0.1,1.0}; colorRailWay[] = {0.8,0.2,0.0,1.0}; colorNames[] = {0.1,0.1,0.1,0.9}; colorInactive[] = {1.0,1.0,1.0,0.5}; colorOutside[] = {0.0,0.0,0.0,1.0}; colorTracks[] = {0.84,0.76,0.65,0.15}; colorTracksFill[] = {0.84,0.76,0.65,1.0}; colorRoads[] = {0.7,0.7,0.7,1.0}; colorRoadsFill[] = {1.0,1.0,1.0,1.0}; colorMainRoads[] = {0.9,0.5,0.3,1.0}; colorMainRoadsFill[] = {1.0,0.6,0.4,1.0}; colorGrid[] = {0.1,0.1,0.1,0.6}; colorGridMap[] = {0.1,0.1,0.1,0.6}; font = "TahomaB"; sizeEx = 0.040000; fontLabel = "PuristaMedium"; sizeExLabel = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontGrid = "TahomaB"; sizeExGrid = 0.02; fontUnits = "TahomaB"; sizeExUnits = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontNames = "EtelkaNarrowMediumPro"; sizeExNames = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2"; fontInfo = "PuristaMedium"; sizeExInfo = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontLevel = "TahomaB"; sizeExLevel = 0.02; text = "#(argb,8,8,3)color(1,1,1,1)"; class Legend { x = "SafeZoneX + ( ((safezoneW / safezoneH) min 1.2) / 40)"; y = "SafeZoneY + safezoneH - 4.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; w = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; h = "3.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; font = "PuristaMedium"; sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; colorBackground[] = {1,1,1,0.5}; color[] = {0,0,0,1}; }; class Task { icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa"; iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa"; iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa"; iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa"; iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa"; color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"}; colorCreated[] = {1,1,1,1}; colorCanceled[] = {0.7,0.7,0.7,1}; colorDone[] = {0.7,1,0.3,1}; colorFailed[] = {1,0.3,0.2,1}; size = 27; importance = 1; coefMin = 1; coefMax = 1; }; class Waypoint { icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; color[] = {0.00, 0.00, 0.00, 1.00}; size = 24; importance = 1.00; coefMin = 1.00; coefMax = 1.00; }; class WaypointCompleted { icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa"; color[] = {0.00, 0.00, 0.00, 1.00}; size = 24; importance = 1.00; coefMin = 1.00; coefMax = 1.00; }; class ActiveMarker { color[] = {0.30, 0.10, 0.90, 1.00}; size = 50; }; class CustomMark { icon = "\A3\ui_f\data\map\mapcontrol\custommark_ca.paa"; size = 24; importance = 1; coefMin = 1; coefMax = 1; color[] = {0,0,0,1}; }; class Command { icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; size = 18; importance = 1; coefMin = 1; coefMax = 1; color[] = {1,1,1,1}; }; class Bush { icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; color[] = {0.45,0.64,0.33,0.4}; size = "14/2"; importance = "0.2 * 14 * 0.05 * 0.05"; coefMin = 0.25; coefMax = 4; }; class Rock { icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa"; color[] = {0.1,0.1,0.1,0.8}; size = 12; importance = "0.5 * 12 * 0.05"; coefMin = 0.25; coefMax = 4; }; class SmallTree { icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; color[] = {0.45,0.64,0.33,0.4}; size = 12; importance = "0.6 * 12 * 0.05"; coefMin = 0.25; coefMax = 4; }; class Tree { icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; color[] = {0.45,0.64,0.33,0.4}; size = 12; importance = "0.9 * 16 * 0.05"; coefMin = 0.25; coefMax = 4; }; class busstop { icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class fuelstation { icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class hospital { icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class church { icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class lighthouse { icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class power { icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class powersolar { icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class powerwave { icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class powerwind { icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class quay { icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class transmitter { icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class watertower { icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {1,1,1,1}; }; class Cross { icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {0,0,0,1}; }; class Chapel { icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {0,0,0,1}; }; class Shipwreck { icon = "\A3\ui_f\data\map\mapcontrol\Shipwreck_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1.0; color[] = {0,0,0,1}; }; class Bunker { icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; size = 14; importance = "1.5 * 14 * 0.05"; coefMin = 0.25; coefMax = 4; color[] = {0,0,0,1}; }; class Fortress { icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; size = 16; importance = "2 * 16 * 0.05"; coefMin = 0.25; coefMax = 4; color[] = {0,0,0,1}; }; class Fountain { icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa"; size = 11; importance = "1 * 12 * 0.05"; coefMin = 0.25; coefMax = 4; color[] = {0,0,0,1}; }; class Ruin { icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa"; size = 16; importance = "1.2 * 16 * 0.05"; coefMin = 1; coefMax = 4; color[] = {0,0,0,1}; }; class Stack { icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa"; size = 20; importance = "2 * 16 * 0.05"; coefMin = 0.9; coefMax = 4; color[] = {0,0,0,1}; }; class Tourism { icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa"; size = 16; importance = "1 * 16 * 0.05"; coefMin = 0.7; coefMax = 4; color[] = {0,0,0,1}; }; class ViewTower { icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa"; size = 16; importance = "2.5 * 16 * 0.05"; coefMin = 0.5; coefMax = 4; color[] = {0,0,0,1}; }; };
  2. George, I found you and David Doss having a discussion on this thread 

     

    I have tried the code below and nothing happens any ideas why?

    NOTES:

    I have tried: Full Bush Path:  a3\plants_f\Bush\b_ficusc2d_f.p3d and without full path  b_ficusc2d_f.p3d

    The bushes do not get replaced

    CODE SAMPLE BELOW 
     

    if (isServer) then {

    private _repleacearray = [

    ["a3\plants_f\Bush\b_ficusc2d_f.p3d", "a3\plants_f\Bush\b_ArundoD3s_F.p3d", 0],
    ["a3\plants_f\Bush\b_neriumo2d_f.p3d", "a3\plants_f\Bush\b_ArundoD3s_F.p3d", 0]
        
    ];


    {
        private _a = ((getModelInfo _x) select 0);
        private _c = _repleacearray select {_a == _x select 0};
        
        if !( _c isEqualTo []) then {
        
            private _b = ((getModelInfo _x) select 1);
            private _replacetree = ([(_c select 0) select 1] call BIS_fnc_simpleObjectData) select 1;
            private _directionOffset = (_c select 0) select 2;

            private _position = getPosWorld _x;
            private _vectorDirUp = [vectorDir _x, vectorUp _x];

            
             
            hideObjectGlobal  _x;
            private _simpletree = createSimpleObject [_replacetree, _position];
            _simpletree setVectorDirAndUp _vectorDirUp;
            _simpletree setDir (getdir _simpletree) + _directionOffset;
            _simpletree enableSimulationGlobal false;
            
            systemchat format["getModelInfo: %1     getPosWorld: %2     replacing tree ",getModelInfo _x, getPosWorld _x,  _x];    

        };

            
    } forEach nearestTerrainObjects 
        [
            [worldSize/2, worldSize/2], 
            ["Tree"], //["Tree","Bush"],
            worldSize, 
            false
        ];
    };

    hint "Replacing_trees_script done";

     

    Any help appreciated

     

    Ant

  3. Pierre,  I am trying to change the appearance of this civilian group created in the code below.

     

    THIS CODE WORKS TO SPAWN GROUPS. SO GOOD TILL HERE.

     

    hint parseText "<img size='6' image='images\rap.paa'/><br/><t align='center' color='#b80406' shadow='2' size='2.75'>WARNING</t><br/><t align='center' color='#FFFFFF'>------------------------------</t><br/><t align='center' color='#FFFFFF'> Suicide Bombers Have Been Detected.</t><t align='center' color='#b80406'></t><br/><t align='center' color='#f6d140'> Stay On High Alert!</t><t align='center' color='#b80406'></t>"; playSound "nukewarn";

    private ["_k_unit","_grp","_ksound","_chasep","_distep"];

    if (!isServer) exitWith {};

    _origin = _this select 0;
    _no        = _this select 1;
    _ksound = _this select 2;
    _chasep    = _this select 3;
    _distep    = _this select 4;

    if (_no>0) then 
    {
        _nr_k = 0;
        while {_nr_k<_no} do 
        {    
            _grp = createGroup civilian;
            _type_k = ["C_Man_casual_6_F_afro","C_man_1_1_F","C_Man_casual_1_F_asia","C_man_1_3_F","C_man_polo_1_F","C_man_polo_1_F_afro","C_Man_casual_3_F_asia","C_man_polo_1_F_asia","C_man_polo_2_F","C_man_polo_2_F_afro","C_man_polo_2_F_euro","C_Man_casual_4_F_euro","C_man_polo_3_F","C_man_polo_3_F_afro","C_Man_casual_5_F_euro","C_man_polo_3_F_asia","C_man_polo_4_F","C_man_polo_4_F_afro","C_man_polo_4_F_euro","C_man_polo_4_F_asia","C_man_polo_5_F","C_man_polo_5_F_afro","C_man_polo_5_F_euro","C_man_polo_5_F_asia","C_man_polo_6_F","C_man_polo_6_F_afro","C_man_polo_6_F_euro","C_man_polo_6_F_asia","C_man_p_fugitive_F","C_man_p_fugitive_F_afro","C_man_p_fugitive_F_euro","C_man_p_fugitive_F_asia","C_man_hunter_1_F","C_Orestes","C_Nikos","C_Nikos","C_man_sport_2_F_afro","C_man_sport_3_F_asia"] call BIS_fnc_selectRandom;
            _type_k createUnit [getMarkerPos _origin, _grp, "[this,_distep,_ksound,_chasep] execvm 'Scripts\kam.sqf'",1];
            _nr_k = _nr_k +1;
            sleep 1;
        };
    };

     

     

    I added these three lines of code below to try and  change just the uniform and headgear

     

    _uniformTypes = ["U_I_C_Soldier_Para_1_F"];
    _type_k_unit addUniform (_uniformTypes call BIS_fnc_selectRandom);
    _type_k unit addHeadgear "H_ShemagOpen_tan";

     

    SO NEW CODE LOOKS LIKE THIS NOW

     

    hint parseText "<img size='6' image='images\rap.paa'/><br/><t align='center' color='#b80406' shadow='2' size='2.75'>WARNING</t><br/><t align='center' color='#FFFFFF'>------------------------------</t><br/><t align='center' color='#FFFFFF'> Suicide Bombers Have Been Detected.</t><t align='center' color='#b80406'></t><br/><t align='center' color='#f6d140'> Stay On High Alert!</t><t align='center' color='#b80406'></t>"; playSound "nukewarn";

    private ["_k_unit","_grp","_ksound","_chasep","_distep"];

    if (!isServer) exitWith {};

    _origin = _this select 0;
    _no        = _this select 1;
    _ksound = _this select 2;
    _chasep    = _this select 3;
    _distep    = _this select 4;

    if (_no>0) then 
    {
        _nr_k = 0;
        while {_nr_k<_no} do 
        {    
            _grp = createGroup civilian;
            _type_k = ["C_Man_casual_6_F_afro","C_man_1_1_F","C_Man_casual_1_F_asia","C_man_1_3_F","C_man_polo_1_F","C_man_polo_1_F_afro","C_Man_casual_3_F_asia","C_man_polo_1_F_asia","C_man_polo_2_F","C_man_polo_2_F_afro","C_man_polo_2_F_euro","C_Man_casual_4_F_euro","C_man_polo_3_F","C_man_polo_3_F_afro","C_Man_casual_5_F_euro","C_man_polo_3_F_asia","C_man_polo_4_F","C_man_polo_4_F_afro","C_man_polo_4_F_euro","C_man_polo_4_F_asia","C_man_polo_5_F","C_man_polo_5_F_afro","C_man_polo_5_F_euro","C_man_polo_5_F_asia","C_man_polo_6_F","C_man_polo_6_F_afro","C_man_polo_6_F_euro","C_man_polo_6_F_asia","C_man_p_fugitive_F","C_man_p_fugitive_F_afro","C_man_p_fugitive_F_euro","C_man_p_fugitive_F_asia","C_man_hunter_1_F","C_Orestes","C_Nikos","C_Nikos","C_man_sport_2_F_afro","C_man_sport_3_F_asia"] call BIS_fnc_selectRandom;
    _uniformTypes = ["U_I_C_Soldier_Para_1_F"];
    _type_k_unit addUniform (_uniformTypes call BIS_fnc_selectRandom);
    _type_k unit addHeadgear "H_ShemagOpen_tan";
            _type_k createUnit [getMarkerPos _origin, _grp, "[this,_distep,_ksound,_chasep] execvm 'Scripts\kam.sqf'",1];
            _nr_k = _nr_k +1;
            sleep 1;
     


        };
    };

     

    After doing this now the AI Groups do not spawn. Any Ideas why.... any help appreciated.

     

    Ant

    1. Show previous comments  1 more
    2. Antman2o1o

      Antman2o1o

      Thanks, Pierre that worked Happy holidays to you.

    3. pierremgi

      pierremgi

      Same. Happy holidays to you and your family.

    4. Antman2o1o

      Antman2o1o

      Thanks, brother appreciate all  you guys do for the community.

  4. Pierre I am kind of stuck trying to bind a key like maybe  shift+m  to my map I am trying to build.
    Reference code on page below. Do you have any suggestions or know of any code samples?

     

    I have been looking around for examples but have not found any. Kind of lost.

     

    1. Show previous comments  19 more
    2. Antman2o1o

      Antman2o1o

      ok i will keep looking

    3. Antman2o1o

      Antman2o1o

      Pierre, I got it working so once again thank you for your help. The only bug i have left is that the player MAP MARKERS do not show on the map. They show if you place a unit down and start a mission but not with spawned in players. Any ideas or suggestions?

       

      Once again thank you for all your help.

      ANT

    4. Antman2o1o

      Antman2o1o

      Pierre, I got it working so once again thank you for your help. THANK YOU THANK YOU for all your help super awesome!!!!

       

       

      ANT

  5. Janez thanks for the suggestion...I was hoping to find someone to help with this Way beyond my current skill set. I will try the information you posted. Ant
  6. Does anyone know of a trigger script that would turn off the player's current position marker on the map when they enter a certain area? The effect would be dictated by the radius of the trigger? The script would need to work in multiplayer. Been searching and have not found anything. Any help highly appreciated Ant
  7. Maybe changing the setmarker Alpha would be it though not sure if it can be done by trigger
  8. Larrow,  do you know if it is possible to remove the player map icons/markers when a player enters a specific area that has a trigger. I am not trying to take them out on the whole map only in a specific area that a trigger area represents when players are in that area.  So the remove player markers would be dictated by the trigger area. 

     

    Not sure if possible

  9. Pierre, is it possible to remove the player map icons / markers when a player enters a specific area that has a trigger. I am not trying to take them out on the whole map only in a specific area that a trigger area represents when a player is in that area. 

     

    Not sure if possible

    1. pierremgi

      pierremgi

      hummm, not sure it's simple. As first answer, I'd disable all icons (server or mission difficulty parameters ), then I'd create some icons for some cases (with ctrlAddEventHandler "draw").

    2. Antman2o1o

      Antman2o1o

      I am faking an underground bunker and i dont want players to know where they are at while in that zone that is out in the middle of the ocean. I thought maybe changing the alpha of the markers maybe when they hit the trigger but not sure.

  10. Stan thanks for the response i have not added any additional tracking scripts and i know you can turn everything off in veteren mode... not what I am asking. I guess for clarity what i am asking is ....is it possible to remove the player map icons / markers when a player enters a specific area that has a trigger. I am not trying to take them out on the whole map only in a specific area that a trigger area represents when a player is in that area. Not sure if possible
  11. The ones on the map that shows player location so blue force tracker i suppose. I am not trying to take them out on the whole map only in a specific area that a trigger area represents when a player is in that area .
  12. Hey folks I am working on a script below and I am not a very skilled coder especially working with arrays and subtracting locations from an array. The main goal would be to have the script trigger a nuke blast in a set time limit with various blast radiuses in a loop. Ideally, I would like to drop a map marker on the location of the blast that is removed after a certain amount of time but just trying to get this working with what I got now. So here goes....At the end of the day, the script should select from a random location for the nuke blast defined by possible locations listed in the array named "nukeme" then remove whatever location it used from the array list so it does not trigger in the same place twice. The triggered nuke blast script should run every 3000 seconds in random locations. So I have a basic understanding of what it does or needs to do not sure if my syntax is correct or even in the ballpark. As always any help appreciated and I am in no way a skilled coder. Script below if ((!isServer) && (player != player)) then {waitUntil {player == player};}; while {true} do { _location = selectrandom possiblelocations; possiblelocations = [nukeme, nukeme1, nukeme2,nukeme3,nukeme4,nukeme5,nukeme6],-_location; /*to make sure one location is not used twice*/ [_location,nukeme,nukeme,nukeme1,nukeme2,nukeme3,nukeme4,nukeme5,nukeme6] execvm "Al_Nuke\alias_nuke.sqf"; place marker; sleep 3000+random 1000; }
  13. Pierre thank you for the response would the code look like this? ..... Yes the ""nukeme"" are empty map markers named nukeme, nukeme1 etc... How would the blast size be defined? Will this code work on a dedicated server for multiplayer? 0 = [] spawn { possiblelocations = ["nukeme", "nukeme1", "nukeme2","nukeme3","nukeme4","nukeme5","nukeme6"]; while {true} do { private _location = possibleLocations deleteAt (floor random count possibleLocations); [_location,nukeme,nukeme,nukeme1,nukeme2,nukeme3,nukeme4,nukeme5,nukeme6] execvm "Al_Nuke\alias_nuke.sqf"; sleep 3000; }; };
  14. Antman2o1o

    JBOY Sniper Nest In Tree

    You Guys are Awesome
  15. Antman2o1o

    JBOY Sniper Nest In Tree

    Guys thanks for the response I am just not skilled enough to convert it into a function. Its a great script maybe someone can take lead here.
  16. Antman2o1o

    JBOY Sniper Nest In Tree

    Jboy I am trying to incorporate this on a dedicated sever mission with various playable units from different teams Blufor, Opfor, & Independent ....PVP. Everything shows up though when a player walks up to a tree they can't climb up it. The prompt to climb the tree shows but the player does not climb the tree. Any ideas....Please help I would love to add this to our server. Great script bye the way.
  17. Hello Bohemia Community. I found this post on reddit and was wondering if the code shown below would raise the sea level of a map like Stratis. I wanted to try this for myself but I was not sure of where to place the code below....My goal would be to flood parts of Stratis map by script. Would the code go in the init file? Any help pointing me in the right direction would be highly appreciated. If you want to try it out, here is the code from the post below class CfgPatches{ `class BONESCRAP_Tides{` `author="BonesCrap";` `name="Arma 3 - Tides";` `url="`[`http://www.arma3.com`](http://www.arma3.com)`";` `requiredAddons[]=` `{` `"A3_Data_F",` `"A3_Map_Data",` `"A3_Map_Altis",` `"A3_Map_Stratis",` `"A3_Map_Tanoabuka",` `"A3_Map_Malden"` `};` `requiredVersion=0.1;` `units[]={};` `weapons[]={};` `};` }; class CfgWorlds { `class DefaultWorld {};` `class CAWorld: DefaultWorld {};` `class Stratis: CAWorld {` `class Sea {` `MaxTide=200;` `};` `};` `class Altis: CAWorld {` `class Sea {` `MaxTide=200;` `};` `};` `class Tanoa: CAWorld {` `class Sea {` `MaxTide=5;` `};` `};` `class Malden: CAWorld {` `class Sea {` `MaxTide=-200;` `};` `};` Ant
  18. Does anyone know of a script for a an EMP grenade that is associated to the IR grenade that would take out a demining drone flying above? Any ideas or suggestions appreciated Ant.
  19. H that did not work either its like the script doesnt run not sure if it should be triggered from the main mission init?
  20. What i have now is that does not work ...when i try in multiplayer...not sure if it is triggered from the main mission init. emp.sqf _AOE = _this select 0; _Drones = nearestObjects [_AOE , ["B_UAV_01_F", "I_UAV_01_F","O_UAV_01_F"], 150]; _DamageOFF = 0.95; _DamageON = 0.00; _Vehicles = nearestObjects [(getpos _AOE), ["Car", "UAV"], 150]; _CountLights = count _Lights; (_Lights select 0) say3D "electricity_loop"; sleep (floor(random 3) +2); for "_i" from 0 to _CountLights do //this will run 1 extra time //replace 0 with 1 or _CountLights with (_CountLights - 1) { if (getDammage (_Lights select _i) < 0.90) then { (_Lights select _i) setDamage _DamageOFF; sleep 0.1; (_Lights select _i) setDamage _DamageON; sleep 0.1; (_Lights select _i) setDamage _DamageOFF; sleep 0.1; }; }; { if (isEngineOn _x) then {_x setHit ["motor", 1]} } foreach _Vehicles; main mission init.sqf player addEventHandler ["Fired", { if (_this select 5 == "B_IR_Grenade") then { _this spawn { _bullet = _this select 6; _newpos = getPosATL _bullet; while {(_newpos select 2) > .1} do { _newpos = getPos _bullet; sleep 0.1; }; [_bullet] execVM "addons\scripts\emp.sqf"; }; }; }]; Any Help Appreciated Ant
×