Jump to content

JIMMI DEE BILLY BOB

Member
  • Content Count

    40
  • Joined

  • Last visited

  • Medals

Posts posted by JIMMI DEE BILLY BOB


  1. On 2/29/2024 at 10:36 PM, dreadpirate said:

     

    I don't understand what you're trying to do here. Plank looks like a script to give players the ability to build fortifications, but you're trying to add it to an NPC?

     


     

     

    I have built quite a few missions built around a mod called drogon enhanced command, here you can control all friendly forces and take direct control of them as a player, here I use your script to respawn groups in waves, the purpose of just that unit here is that it must be able to build fortifications, everything worked on my PC singleplayer and multiplayer, but when I use this script as described as original on a dedicated server it doesn't work, here I'm just trying to find another solution.

     

    Plank scripted works perfectly on dedicated server on units and vehicles, only when I put scripted in units & vehicles init and repawn vehicles module expression field in editor, but i cant respawn units with it in them.

     

    Unit editor, this works.

    [_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;

     


  2. Can this be done? using a other script on server, i works with sgf file on MP singleplayer, not server.

     

    https://github.com/kami-/plank

     

     

    0 = [this, "DELAY=",300, "INIT=", " 
    (group _proxyThis)[_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;"]
    spawn jebus_fnc_main;

    when loading, it says there is a problem there l

    (group _proxyThis)l[_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;"]spawn jebus_fnc_main;

     

     

     

     

    If this can work on a units init. on server, that should work in some way to in jebus. 😄 😢 

    [_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;

     

     

    --------------------------orignal sgf

     

         0 = [this, "DELAY=",300, "INIT=", "{[_x] execVM 'Ticket1OFFn.sqf'} forEach units (group _proxyThis);"]spawn jebus_fnc_main;   

     

    Ticket1OFFn.sqf----------------------------------- dont work to

     

     if (!isServer) exitWith {};

    _unit = _this #0;

    _unit enableFatigue false;

    call compile preprocessFileLineNumbers "plank\plank_init.sqf";
    [_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;

    [West, -3] call BIS_fnc_respawnTickets;

    East addScoreSide 1;
     


  3. I almost gave up, but came up with a possible other solution, just haven't gotten it to work yet.

     

     

    The respawn script in the unit-----------------

    On 2/26/2024 at 12:51 AM, JIMMI DEE BILLY BOB said:

    0 = [this, "DELAY=",300, "INIT=", "{[_x] execVM 'Ticket1OFFn.sqf'} forEach units (group _proxyThis);"]spawn jebus_fnc_main;   

     

    0 = [this, "DELAY=",300, "INIT=", " 
    (group _proxyThis)[_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;"]
    spawn jebus_fnc_main;

    when loading, it says there is a problem there l

    (group _proxyThis)l[_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;"]spawn jebus_fnc_main;

     

     

     

     

    If this can work on a units init. on server, that should to in some way to. 😄 😢 

    [_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;

     


  4. On 2/22/2024 at 8:44 PM, dupa1 said:

    First piece of code: I've marked some code lines with numbers and below there are some comments.

    
    if (!isServer) exitWith {};   //*********** 1 ***********
    
    _veh = _this #0;  call compile preprocessFileLineNumbers "plank\plank_init.sqf";
    [_veh, [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0]] call plank_api_fnc_forceAddFortifications;
    
     _veh = _this #0; _veh addEventHandler ["killed",{  
     _bomb="ammo_Missile_Cruise_01" createVehicle (getPos (_this select 0));
     (_this select 0)}];
    
    _veh = _this #0; _veh addAction  //*********** 2 ***********
    [
      "Dispense AT mines : Fire slugs in driver seat,and to the right side of vehicle, mines will be covering a 40mradius 65 meters out ",
      {}];
    
    dont work
    _veh = _this #0; _veh addEventHandler ["Fired", {
          flareN = "AT_Mine_155mm_AMOS_range" createvehicle ((player) ModelToWorld [65,0,150]); //*********** 3 ***********
          flareN setVelocity [0,0,-01];
    }];

     

    First of all, I repeat my question:

    If is VERY IMPORTANT to know where the script is called from. So I am asking again: Where is the SQF file called from? Where is the execVM command that runs it? Is it in an init line of an editor object? Is it in init.sqf? Or elsewhere? 

     

    Remarks regarding the code:

    1. This means that the script will run on server only. 

    2. AddAction should be used on clients, but your script runs on the server. This action is added on the server only, so clients won't be able to see it. Consider using remoteExec here.

    3. In this line of code you mention "player". There is no player on dedicated server, so you should use some other object for position reference. You do have an array of all players, it's called: allPlayers. https://community.bistudio.com/wiki/allPlayers

     

    The second piece of code:

    
    nukeArt1 setVehicleAmmo 0.0313;
    Natohelipilot2 moveInGunner blackfoot1;
    blackfoot1 setVehicleLock "UNLOCKED";

     

    I am not sure I completely understand your explanation:

    If I understand correctly, you have an Addaction in an init line of an object in the editor that calls this script. 

    In the wiki setVehicleAmmo, moveInGunner and setVehicleLock  all have a "LA" icon, which means "local argument" it means that these commands have to be run on the machines where the vehicle is local. When you use an action, the action code is executed on the players machine. By default, empty vehicles are local to server, but if a player enters them, they switch locality to the players computer. So try the following (not tested):

    
    [nukeArt1, 0.0313] remoteExec ["setVehicleAmmo", nukeArt1];
    [Natohelipilot2, blackfoot1] remoteExec ["moveInGunner", Natohelipilot2];
    [blackfoot1, "UNLOCKED"] remoteExec ["setVehicleLock", blackfoot1];

    To make your mission work on the dedicated server, you will need patience. Try to concentrate on one problem at a time.

     

     

     

     

     

     

     

    I know that I have answered for a little too long, it is probably also a little because I am impatient, I don't have that much time, the 2 years that I have spent were for the purpose of being able to finish, so that i could play something casual without spending 8-16 hours to get some action in Arma 3, i could play with Ai but it's not the same as a human player.

     

    I found a half solution to most of the problems, I just need to fix them in the missions, except for this big problem.

     

    I am using jebus/gaia script, it works perfectly but no my scripting 

     

     

    this is in the units init. its a officer Nato side 🙂 it works just not on the server, RemoteExoc make no deferens.---------------------------------

     

         0 = [this, "DELAY=",300, "INIT=", "{[_x] execVM 'Ticket1OFFn.sqf'} forEach units (group _proxyThis);"]spawn jebus_fnc_main;   

     

    Ticket1OFFn.sqf----------------------------------- dont work to

     

     if (!isServer) exitWith {};

    _unit = _this #0; _unit enableFatigue false;

    call compile preprocessFileLineNumbers "plank\plank_init.sqf";
    [_unit, [6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ,2 ,2, 0, 0, 0, 100, 100, 100, 60]] call plank_api_fnc_forceAddFortifications;

    [West, -3] call BIS_fnc_respawnTickets;

    East addScoreSide 1;
     

     

     

     

     

    The green is a script called plank https://github.com/kami-/plank?tab=readme-ov-file

    this script does work on server, only if but it in a planced units init


  5. 14 hours ago, dupa1 said:

    I can understand your frustration,  but from your explanation, I really have no clue what the problem is. The code you posted looks ok. If it works on your PC, then  the problem is not the code itself, but where it gets called from. To code MP missions, you should have an understanding of MP locality.

     

    Read this page carefully:

    https://community.bistudio.com/wiki/Multiplayer_Scripting

     

    As of your problem, let's be more clear:

    -  What do you mean exactly by "doesn't work" - the code does not get called?

    -  Where is the code written?- (init field, init.sqf etc....)


    //dont work: is to point out where i have problems, the language scripting is kind of hard for me.

    My problems basically these parts of the script her under, i get that it has something to do with how the code run, like server and local, I just can't figure it out.

    // this is my main problem, i have like 50 of Them running on my missions on units and vehicles, it is run by remoteVM, i tried RemoteExec, they looks like the same problem.

     

    —————-SQF file
    if (!isServer) exitWith {};

     


    _veh = _this #0;  call compile preprocessFileLineNumbers "plank\plank_init.sqf";
    [_veh, [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0]] call plank_api_fnc_forceAddFortifications;

     

     _veh = _this #0; _veh addEventHandler ["killed",{
     _bomb="ammo_Missile_Cruise_01" createVehicle (getPos (_this select 0));
     (_this select 0)}];


    _veh = _this #0; _veh addAction
    [
      "Dispense AT mines : Fire slugs in driver seat,and to the right side of vehicle, mines will be covering a 40mradius 65 meters out ",
      {}];


    dont work
    _veh = _this #0; _veh addEventHandler ["Fired", {
          flareN = "AT_Mine_155mm_AMOS_range" createvehicle ((player) ModelToWorld [65,0,150]);
          flareN setVelocity [0,0,-01];
    }];

     

     

    My sekund problem is when i use adaction in mission on a object, then these lines will not manipulate objects as described, but that is my least problem, but it would be easier to solve the problems in  the sqf file.


    ———sqf file

     

    NnukeArt1 setVehicleAmmo 0.0313;

     

    Natohelipilot2 moveInGunner blackfoot1;

    blackfoot1 setVehicleLock "UNLOCKED";


  6.  

    if (!isServer) exitWith {};


    _veh = _this #0; _veh lockCargo true;
    _veh = _this #0; _veh removeWeaponTurret ["LMG_RCWS", [0]];
    _veh = _this #0; _veh lockturret [[0,0],true];
    _veh = _this #0; _veh lockturret [[0],true];
    _veh = _this #0; _veh animate ["HideTurret", 1];
    _veh = _this #0; _veh allowCrewInImmobile true;
    _veh = _this #0; _veh removeWeaponTurret ["SmokeLauncher",[0,0]];


    //dont work
    _veh = _this #0; _veh addAction
    [
      "Dispense AT mines : Fire slugs in driver seat,and to the right side of vehicle, mines will be covering a 40m radius 65 meters out ",
      {}];
    //

    _veh = _this #0; _veh addWeaponTurret ["sgun_HunterShotgun_01_sawedoff_F",[-1]];
    { _veh addMagazineTurret ["2Rnd_12Gauge_Slug",[-1]] } count [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];

    //dont work
    _veh = _this #0; _veh addEventHandler ["Fired", {
          flareN = "AT_Mine_155mm_AMOS_range" createvehicle ((player) ModelToWorld [65,0,150]);
          flareN setVelocity [0,0,-01];
    }];
    //

    //dont work
     _veh = _this #0; _veh addEventHandler ["killed",{
     _bomb="ammo_Missile_Cruise_01" createVehicle (getPos (_this select 0));
     (_this select 0)}];
    //

    //dont work
    _veh = _this #0;  call compile preprocessFileLineNumbers "plank\plank_init.sqf";
    [_veh, [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0]] call plank_api_fnc_forceAddFortifications;
    //

    [West, -24] call BIS_fnc_respawnTickets;

    east addScoreSide 2;

     

    I know it can work on the server, I've tried using vehicle init, but there's something I'm doing wrong, I have a not a chance to figure it out, I'm bad at scripting.


  7.  

    the Object


    this addaction["------------------------------------------------------", ""]; 
    this addAction ["Buy 3x Cruise missiles", "NuCruiserM1.sqf"];    
    this addaction["------------------------------------------------------", ""];                                                                     
    this addAction ["Buy one 0,3kt nuclear howitzer shell", "NukeWar1.sqf"];            ///this on, they are all the same                                                
    this addAction ["Buy one 3kt nuclear Cruise missile", "NukeWar11.sqf"];      

     

    ----------------------------------------------------------------------------------------------------------------------

     


    //dont work, it works the sekund time a try to addaction, and then I would have used 2x the tickets
    NnukeArt1 setVehicleAmmo 0.0313;
    //

    "Instructions" hintC [
     "You can only buy one nuclear howitzer shell at a time.",
        "Trying to buy more will only cost your team more tickets.",
     "Nuclear howitzer shell has been armed in Hammer cannon on destroyer.",
     "Use UAV terminal to control Hammer."
    ];
    hintC_EH = findDisplay 72 displayAddEventHandler ["Unload", {
     _this spawn {
      _this select 0 displayRemoveEventHandler ["Unload", hintC_EH];
      hintSilent "";
     };
    }];
    [west, -50] call BIS_fnc_respawnTickets;

     

     

     


  8.  

    the Object


    this addaction["------------------------------------------------------", ""]; 
    this addAction ["Buy F/A-181 Black Wasp Stealth", "buyAir\BlackWaspStealth1.sqf"];                                                                        
    this addAction ["Buy F/A-181 Black Wasp", "buyAir\BlackWasp1.sqf"];                                                      
    this addAction ["Buy A-149 Gryphon", "buyAir\Gryphon1.sqf"]; 
    this addAction ["Buy A-143 Buzzard", "buyAir\Buzzard1.sqf"];                                                                        
    this addAction ["Buy A-164 Wipeout", "buyAir\Wipeout1.sqf"];  
    this addaction["------------------------------------------------------", ""];                                                      
    this addAction ["Buy AH-99 blackfoot", "buyAir\blackfoot1.sqf"];      ///this on, they are all the same 
    this addAction ["Buy WY-55 hellcat", "buyAir\hellcat1.sqf"];                                                                        
    this addAction ["Buy AH-9 Pawnee", "buyAir\pawnee1.sqf"];


    ----------------------------------------------------------------------------------------------------------------------


    "Instructions" hintC [
     "You have bought the AH-99 blackfoot, it is unlocked now.",
            "Dont pay for it again!"
    ];
    hintC_EH = findDisplay 72 displayAddEventHandler ["Unload", {
     _this spawn {
      _this select 0 displayRemoveEventHandler ["Unload", hintC_EH];
      hintSilent "";
     };
    }];

    [West, -80] call BIS_fnc_respawnTickets;

    //dont work
    Natohelipilot2 moveInGunner blackfoot1;
    //
    //dont work
    blackfoot1 setVehicleLock "UNLOCKED";
    //

     


  9. I have just recently finished making a lot of missions for my server, have tested them in single player and multi player, they work there, but when I test them on my nitrado server, they do not work according to the script.
    I have written on the codes what does not work, will someone help me, I am desperate.

    I really want it to work so I could invite strangers into a game, I have spent 2 years to this date to make the missions, it would really hurt if I wasted my time, only by playing with myself.

     

    https://youtu.be/wv3S-cGHJpU?si=FGikttrppBPPH9bH


  10. I'm trying to make killer drones/suicide drones, the AR-2 Darter's waypont dont work when i spawn it star mission and respawn it with respawn vehicle module, but AL-6/AL-6 (medical) does, the issue is that it does not have thermal vision or night vision, does anyone know if it can be added easy with script in the objet init?

     

    The AL-6/AL-6 (medical) only have driver seat that can be controled.


  11. I've made the Jamming vehicle (NatoEW)a bit better, with more depth, not perfect, but still fun.

     

    3800m from EW will setAutonomous FALSE; drone wil stop flying, just hover. 

    2500m from EW will setDamage 1; it will destroy the drone.

     

    Init.sqf

    ------------

     

    //// EW Nato

     

        nul = [] spawn
        {
        while {true} do
        {
        sleep 15;
        {_x setAutonomous FALSE;} forEach (nearestObjects  [NatoEW, ["O_UAV_01_F","O_Static_Designator_02_F","O_UAV_06_medical_F","O_UAV_06_F"], 3800]);
        };
        };
       nul = [] spawn
        {
        while {true} do
        {
        sleep 15;
        {_x setDamage 1;} forEach (nearestObjects  [NatoEW, ["O_UAV_01_F","O_Static_Designator_02_F","O_UAV_06_medical_F","O_UAV_06_F"], 2500]);
        };
        };


     

    • Like 1

  12. 6 hours ago, JCataclisma said:

    I don't know how much a permanent/infinite "searching" for menaces around vehicle could impact performance - and I haven't exactly tried a way to do it, but you will probably need to add such code in the init.sqs just like the markers' stuff you have already figured out.

    But, as an idea, you could try and use an addAction to the vehicle, and so run a "searcher.sqf" external file.

    
    this addAction ["<t color='#f0cc0f'>Clear Threats!</t>",
    {
            [] spawn {
                execVM "searcher.sqf";
            };
    }];



    Such file could contain something like the code below, adapted from a "searcher" script I run for my creations:

    
    // searcher.sqf
    
    _droneStuffClasses =  ["O_UAV_01_F","O_Static_Designator_02_F","O_UAV_06_medical_F","O_UAV_06_F"];
    _flyingMenaceClasses = _droneStuffClasses;
    _nearbyFlyingMenaces = nearestObjects [player, _flyingMenaceClasses, 3500, false, false];
    
    	{
    	_menaceClass = typeOf _x;
    	if (_menaceClass in _droneStuffClasses) then {
    		deleteVehicle _x;
    		};
    	} forEach _nearbyFlyingMenaces;


    As guys here have taught me, it might be much more efficient if you create an array with the vehicles'  classes you want to destroy, so you could easily edit it in future, just by adding or removing from such list, without needing to search for them in the entire code.

    In the script above, firstly we create an array. But such is not accepted for searching in "nearby", so we create a "simple" variable (_flyingMenaceClasses) containing everything in the previous array.

    Then we say what we want to search and delete in case it matches what we (don't) want. You can even go crazy and add some visual stuff like, instead of "delete", use "setDamage 1;" and also create some grenades or explosions around eliminated threats 😁

     

    It dont work, I have done as you showed me.

     

     

    regarding the impact on performance, I have noticed that when you just make the time between searches longer, you can't notice anything.

     

    I have the script i shared running 4 x every 15 sek, I dont feel it

     

     

     

     


  13. 7 hours ago, JCataclisma said:

    But if your doubt is regarding attachTo, it's not that different. It works in a very similar way, but instead of cardinal directions, X = forward(+)/backwards(-), Y = right(+)/left(-), Z = above(+)/below(-) relative to the CENTER of the vehicle/unit you are attaching things to.

     

     

    My biggest problems are the language in these scripts themselves, I'm a bit dyslexic, I am use to collect all the scrips I get in missions so I can reuse them or manipulate them, I spell badly in English, I use Google to check typos 😄 i dont have a chance to learn this, it gives me a headache 😄 

    • Confused 1

  14. Im trying to make a simple electronic warfare vehicle to jam drones, i have a script that works for markers, but i dont know to make it work with vehicles, I imagine it's pretty simple, but I can't figure it out.

     

    The idea is that all drones that come within a range of 3.5 km of vehicle will get destroyed, now here in this case deleted, a simple way to defend against drones.

     

    this works for markers in the INIT.sqf file

    // Clean Drones

    nul = [] spawn
    {
      private _pos = markerPos "EWvehicle";
      while {true} do
      {
        sleep 15;
        {deleteVehicle _x} forEach nearestObjects [_pos, ["O_UAV_01_F","O_Static_Designator_02_F","O_UAV_06_medical_F","O_UAV_06_F"], 3500];
      };
    };
     


  15. On 9/15/2023 at 4:20 AM, JCataclisma said:

    Maybe give it another try?

     

    
     	_sphere = "AT_Mine_155mm_AMOS_range" createVehicle [0, 0, 0];
    	_sphere attachTo [_projectile, [0,40,30], "usti", true]; // usti means muzzle
    	[_sphere, [0,90,0]] call BIS_fnc_setObjectRotation;	//yaw, pitch, roll;
    	_sphere enableSimulation true;

     

    _veh = _this #0; _veh addAction
    [
      "Dispense AT/AP mines : Fire slugs in driver seat, to the right side of vehicle, mines will be covering a 40m radius 65 meters out ",
      {}];


    _veh = _this #0; _veh removeWeaponTurret ["SmokeLauncher",[0,0]];

    _veh = _this #0; _veh addWeaponTurret ["sgun_HunterShotgun_01_sawedoff_F",[-1]];
    { _veh addMagazineTurret ["2Rnd_12Gauge_Slug",[-1]] } count [1,2,3,4,5,6,7,8,9,10];


    _veh = _this #0; _veh addEventHandler ["Fired", {
          flareN = "AT_Mine_155mm_AMOS_range" createvehicle ((player) ModelToWorld [65,0,150]); 
          flareN setVelocity [0,0,-01];
          flareNE = "Mine_155mm_AMOS_range" createvehicle ((player) ModelToWorld [65,0,150]); 
          flareNE setVelocity [0,0,-01];
    }];

     

     

    I wanted to reply to you a little earlier, something got in the way, I figured out how to get the mines in the right direction, I still don't understand the system of Y X Z.

     


  16. 11 hours ago, JIMMI DEE BILLY BOB said:

    I think it will definitely be useful, I will try to make it work with event handler, or add action.

    Thank you very much, I will share the result when I succeeded

    if (!isServer) exitWith {};
                                        

    _veh = _this #0; _veh lockCargo true;    
    _veh = _this #0; _veh removeWeaponTurret ["LMG_RCWS", [0]];       
    _veh = _this #0; _veh lockturret [[0,0],true];                  
    _veh = _this #0; _veh lockturret [[0],true];                                            
    _veh = _this #0; _veh animate ["HideTurret", 1];   
    _veh = _this #0; _veh allowCrewInImmobile true;   

    _veh = _this #0; _veh addAction
    [

      "Dispense mines :Fire slugs in driver,and 110m south from vehicle AP/AT mines will be covering a radius of 40m ",   //The shell will only fly in one direction, not in the vehicles direction, but it is much better than before 😄 
      {}];


    _veh = _this #0; _veh addWeaponTurret ["sgun_HunterShotgun_01_sawedoff_F",[-1]];       
    { _veh addMagazineTurret ["2Rnd_12Gauge_Slug",[-1]] } count [1,2,3,4,5,6,7,8,9,10];  


    _veh = _this #0; _veh addEventHandler ["Fired", { 
          flareN = "AT_Mine_155mm_AMOS_range" createvehicle ((player) ModelToWorld [0,0,100]); 
          flareN setVelocity [0,25,-5];
          flareNE = "Mine_155mm_AMOS_range" createvehicle ((player) ModelToWorld [0,0,100]);
          flareNE setVelocity [0,25,-5];
    }];

    nul = _veh spawn { while {alive _this} do { _this setVehicleAmmo 1; sleep 1200} };


    _veh = _this #0;  call compile preprocessFileLineNumbers "plank\plank_init.sqf"; 
    [_veh, [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0]] call plank_api_fnc_forceAddFortifications;

    [West, -24] call BIS_fnc_respawnTickets;

    east addScoreSide 2;

    • Like 1

  17. 6 hours ago, JCataclisma said:

    I cannot think of why the fnc_rotations doesn't work for you. Did you get any error messages, or it just didn't do anything at all?
    Because it's working fine in both editor and dedicated MP for us.

    If you take a look at the videos, the red-and-white towbars are created by script (createVehicle at position 0,0,0), attached and rotated with such BIS function.

    Towbars attached under the Huron:
     



    And here, towbars attached to the red container
     


     

    I read in another thread that you couldn't because the projectile moved so fast that it wouldn't work, I've used attachTO where my game has shut itself down, doesn't say that they will do it 🙂


  18. 7 minutes ago, JCataclisma said:

    Also, maybe this one helps you to improve (or not!) the positioning AND speed of released bombs. This is what I use for a "Launch flares" action from my helicopters:

     

    
    flareN = "F_20mm_Green" createvehicle ((player) ModelToWorld [0,50,150]); 
    			flareN setVelocity [0,25,-5];
    			flareNE = "F_20mm_Yellow" createvehicle ((player) ModelToWorld [15,25,150]);
    			flareNE setVelocity [5,15,-15];
    			flareE = "F_20mm_Red" createvehicle ((player) ModelToWorld [15,0,150]);
    			flareE setVelocity [10,25,-5];
    			flareSE = "F_20mm_Yellow" createvehicle ((player) ModelToWorld [15,-25,150]);
    			flareSE setVelocity [-5,-15,-15];
    			flareS = "F_20mm_Green" createvehicle ((player) ModelToWorld [0,-50,150]);
    			flareS setVelocity [0,-25,-5];
    			flareSW = "F_20mm_Yellow" createvehicle ((player) ModelToWorld [-15,-25,150]);
    			flareSW setVelocity [-5,-15,-15];
    			flareW = "F_20mm_Red" createvehicle ((player) ModelToWorld [-15,0,150]);
    			flareW setVelocity [-10,25,-5];
    			flareNW = "F_20mm_Yellow" createvehicle ((player) ModelToWorld [-15,25,150]);
    			flareNW setVelocity [-5,15,-15];

     

    I think it will definitely be useful, I will try to make it work with event handler, or add action.

    Thank you very much, I will share the result when I succeeded


  19. 6 minutes ago, JCataclisma said:

    Regarding "rotation" and stuff related with createVehicle + attachTo, I have been pretty happy lately by using
    BIS_fnc_setObjectRotation . It has been the most effective way to mix pitch, yaw and roll for attached objects for me.
    https://community.bistudio.com/wiki/BIS_fnc_setObjectRotation

    Let's say, for creating an inner night-light for a helicopter:
        _objLowLight1 = createVehicle ["reflector_cone_01_narrow_red_f",[0,0,0], [], 0, "NONE"];
        _objLowLight1 attachTo [_currentVehicle, [0, -1.2, 1.1]];
        [_objLowLight1, [0,-65,180]] call BIS_fnc_setObjectRotation;

    Maybe you could try:
     

    
    [_sphere, [0,-90,0]] call BIS_fnc_setObjectRotation;	

    ---------------------------------------------------------------------------

    It didn't work, I don't think you can rotate the object with attachto, I read somewhere that it's not possible


  20. hi.

    I'm trying to make a mine dispenser vehicle to be able to quickly make a minefield.

     

    I use "AT_Mine_155mm_AMOS_range" & "Mine_155mm_AMOS_range" as the create vehicle, the problem is that the projectile flies straight out, or 45 degrees down from where i point it, it causes the shell to fly in that direction as well, and it causes the mines to be dispensed uncontrollably, I need the shell be able to it ends up pointing down off at 90 degrees, so the spred mines end up in a circle area.

     

     

    this addEventHandler["Fired",     
    {     
      params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_vehicle"];     
      _sphere = "AT_Mine_155mm_AMOS_range" createVehicle (getPosATL _projectile);     
      _sphere attachTo [_projectile,[0,0,40]];     
    }];   

     

    ________________________________________________________________________________________  

    I've tried with the one below, but it doesn't work, the projectile doesn't turn, only if I attach it to a vehicle, the shell also doesn't work correctly

    ________________________________________________________________________________________

    this addEventHandler["Fired",     
    {     
      params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_vehicle"];     
      _sphere = "Mine_155mm_AMOS_range" createVehicle (getPosATL _projectile);  
      _sphere attachTo [_projectile,[0,0,40]];   
      _sphere setVectorDirAndUp [[0,0,-1], [0,1,0]]; 
    }];   
    ____________________________________________________________________________________________

    Don't really care how the mines end up out there, but artillery shells work great, the version does not work ether.

    --------------------------------------------------------------------------------------------------------------------------------------------------

     

    this addAction
    [
      "Dispense mines",
      {
        params ["_target", "_caller", "_actionId", "_arguments"];
      _sphere = "AT_Mine_155mm_AMOS_range" createVehicle (getPosATL _caller);  
      _sphere attachTo [_caller,[0,40,30]];  
     _sphere setVectorDirAndUp [[0,0,-1], [0,1,0]]; 
      }];


     

     

     

    ----------------------------------

    My plan is to make the bobcat into a combined breaching mine dispenser and recovery vehicle 

     

    Using plank scrip.   

     

    first attempt, not very practical

     


  21. 21 hours ago, Harzach said:

     

    I made a small but crucial mistake in my code. Sorry! I have fixed it above. It is tested and working.

     

     

    It worked perfectly thank you 😄  

     

    It was the last script I needed to complete my pvp/pve mission I spent years perfecting, now I can start a server soon.

     

     

    For whoever

     

    // mission/init location

     

    //Cleanup mines aria 

     

    nul = [] spawn

    {

    private _pos = markerPos "MarkerName"; while {true} do

    {

    sleep 10; {deleteVehicle _x} forEach nearestMines [_pos, [], 3500];

    };

    };


  22. 7 hours ago, Harzach said:

    What is MinesMarker1? Assuming it's a marker, this won't work, as nearestMines needs a position or object.

     

    Also, "ALL" isn't a class. From the Biki:

     

    So, try:

    
    nul = [] spawn
    private _pos = markerPos "MinesMarker1";
    {
    	while {true} do
    	{
    		sleep 10;
    		{deleteVehicle _x} forEach nearestMines [_pos, [], 3500];
    	};
    };

     

    MineMarker1 was a marker, but it dit not work, I have only made it work as a trigger activation where a unit enters it.. {deleteVehicle _x} forEach nearestMines [Minestrigger1, ["All"], 3500]

     

     

    Is there a way to make it work with an object instead 🙂 ? I just need way to clear an area of mines constantly, can you activate trigger with sleep, and repeat this like this?

     

     

    I got my wrong understanding from this link 

     


  23. what am I doing wrong, trying to make an area that gets cleared of mines every 10 seconds.

     

    The goal is to avoid spamming of 155mm ATmine shells so that it is possible to get out of the starting area

     

     

    // init location

     

    //Cleanup mines aria 


    nul = [] spawn
      {
      while {true} do
        {
        sleep 10;

         {deleteVehicle _x} forEach nearestMines [MinesMarker1, ["All"], 3500];

        };
      };

     

×