Jump to content

J.Larsson

Member
  • Content Count

    16
  • Joined

  • Last visited

  • Medals

Posts posted by J.Larsson


  1. I am not even sure what to call them,
    https://imgur.com/a/tBcXlzI

    OlaqeL6.jpg

     

    QqYIcFX.jpg

     

    So I want these markers to be hidden in game, how do I proceed to make it work.


    I am very new to arma 3 editor and bad with scrips, please ad instructions.
    (i have google this issue but did not find what i was looking for.)

    Special thanks to Larrow.
     

    Solved

    step 1: create a init.sqf file

     

    Step 2: copy this script and past it in the init file


     

    Spoiler

    {
    _sector = _x;
    {
        _trigger = _x;
        _markerArea = (_trigger getVariable "markers") select 0;
        _markerArea setMarkerAlpha 0;
    }forEach (_sector getVariable "areas");
    }forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");
    h = [] spawn {
    while {true} do {
        _toHide = [];
        {
            _sector = _x;
            if (player distance _sector > 10) then {
                _toHide set [count _toHide, _sector];
                _h = _sector spawn {
                    waitUntil {player distance _this < 10};
                    missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") + [_this]];
                };
            };
        }forEach (missionNamespace getVariable "BIS_fnc_moduleSector_sectors");
        missionNamespace setVariable ["BIS_fnc_moduleSector_sectors", (missionNamespace getVariable "BIS_fnc_moduleSector_sectors") - _toHide];
    };
    };


    step 3: result
     

    Spoiler

     


    zYPkEyG.jpg

    R7W1kho.jpg

     


  2. 2 hours ago, pierremgi said:

    The question is: what is an abandoned vehicle?
    I suggest, a vehicle which had a crew, then crew disembarked and no one embarks after that (no more crew).
    You could run a little code like this (initServer.sqf)

    
    [] spawn {
      while {true} do {
        sleep 5;
        {
          if (_x isKindOf "WeaponHolderSimulated") exitWith {};
          _x spawn {
            params ["_veh","_timer","_abandoned"];
            _veh setVariable ["passedClean", TRUE];
            while {alive _veh} do {
              waitUntil {sleep 2; crew _veh isNotEqualTo []};
              waitUntil {sleep 2; crew _veh isEqualTo []};
              _timer = diag_tickTime;
              _abandoned = TRUE;
              while {diag_tickTime < _timer + 60} do { if (crew _veh isNotEqualTo []) then {_abandoned = FALSE}};
              if (_abandoned) then {deleteVehicle _veh};
            };
          };
        } forEach (vehicles select {isNil {_x getVariable "passedClean"}});
      };
    };

    If a vehicle is abandoned more than 60 sec. it'll be deleted.

     

    For flipped vehicles that are some autoflip codes on forum or you can set allowCrewInImmobile (alternative syntax).

    I suggest to add:

    _veh allowCrewInImmobile [TRUE,TRUE];
    or, in MP: [_veh,[TRUE,TRUE]] remoteExec ["allowCrewInImmobile",_veh];

    between the 2 waitUntil in my code.

     


    Thank you Pierremigi

    i will put this thread on [solved]


    a note for other people who enter this thread.
    if you see a AI leave the vehicle, and you decide to jump in yourself into it before it despawns,
    you will break the script for that one vehicle, and it will not despawn and has to be removed manually.


  3. So I use simple Spawn AI module in Arma 3 editor and the module is doing a good job what I want it to do. However.
    the AIs abandons the vehicles the moment it is being flipped or something ells, like broken tires.


    so my question for the community, how would you resolve this issue.


    I am new to editor and bad with scripts, so please, ad instructions how to ad a script or a solutions.

    (I did google this question, but they were very old threads, many were abandon or unclear instructions.)


  4. 3 hours ago, Larrow said:

    Overwrite the notifications for the sector captured and lost in the description.ext and replace their difficulty member with a difficulty option that does not exist.

      Hide contents
    
    
    class CfgNotifications
    {
    	class Default
    	{
    		title = "";				// Title displayed as text on black background. Filled by arguments.
    		iconPicture = "";		// Small icon displayed in left part. Colored by "color", filled by arguments.
    		iconText = "";			// Short text displayed over the icon. Colored by "color", filled by arguments.
    		description = "";		// Brief description displayed as structured text. Colored by "color", filled by arguments.
    		color[] = {1,1,1,1};	// Icon and text color
    		duration = 5;			// How many seconds will the notification be displayed
    		priority = 0;			// Priority; higher number = more important; tasks in queue are selected by priority
    		difficulty[] = {};		// Required difficulty settings. All listed difficulties has to be enabled
    	};
    
    	class SectorCapturedCIV : default { difficulty[] = {"ShowSectorNotification"}; };
    	class SectorCapturedEAST : SectorCapturedCIV {};
    	class SectorCapturedWEST : SectorCapturedCIV {};
    	class SectorCapturedGUER : SectorCapturedCIV {};
    
    	class SectorLostCIV : default { difficulty[] = {"ShowSectorNotification"}; };
    	class SectorLostEAST : SectorLostCIV {};
    	class SectorLostWEST : SectorLostCIV {};
    	class SectorLostGUER : SectorLostCIV {};
    
    };

    There is no such difficultyOption as "ShowSectorNotification" so it will not be enabled so the notification will not be shown.

     

    Wait, i have no description.ext file in my arma mission folder? were do you get it from/create it?


    Edit: i just watched some Youtube videos, i copy the script and pasted inte the EXT file,
    and it did not work, do i have to ad something extra to the description.ext ?

    please bear in mind that i am horrible with scripts.


  5. On 10/25/2022 at 4:50 PM, pierremgi said:

     

    I suggest my "spawn group attack" module. You can link the module with any type of aircraft(s) if you don't want to search for an existing group,... any configuration, choose the number of groups, decide to attach enemies ou players, or script anything for these groups, repeat or not the waves...

    Well, no need to script or script all you need.


    I just learned there were Moduls in workshop in steam.
    the amount of hour I spent on editing I now relies this.


    I just downloaded a fantastic mod,
    https://steamcommunity.com/sharedfiles/filedetails/?id=2268779714

    so in explanation on the map I want to create.

    it is capture objects around the whole world. I want a dynamic system on how enemies will spawn,
    I have the regular “Spawn AI” moduel, these AI are set to a home base and to find the objectives and capture them.

    as for the A.E.S workshop Moduel, it spawn random enemies around you at an specific area.
    including, small chance spawning a hunter group that will seek you out and eliminate you. ❤️

    there is one Key design I need to my map. Then I am done!
    a moduel that can spawn AI Aircraft, Helicopters / Planes - seek and destroy. And once they die. They spawn again within a timer.


    BTW pierremgi, I used the scrip, it worked at start, but after a while, vehicle started to spawn without a driver after 15 min ish into the game.
    so I had to scrap it. (I am terrible with scrips, I rather avoid it if possible.)

    Thank you Have a nice day.


  6. so I have followed these tutorials and it worked very good.

    https://youtu.be/lnRs_MEqwSs

     

    however…. When I save the game, and leave and re join, chose “Resume” to start were I left.
    All objectives stops working, me or AI can no longer capture objectives. Any one has a clue what is going on?

    technically the game is capture points style of game, and there is a lot of areas to capture.
    (the whole map has objectives)

    Note I am awful with scripts so I try to avoid it as much I can.
    and I am still very new to Editor in arma.

×