Jump to content

EnvakeoLugaria

Member
  • Content Count

    32
  • Joined

  • Last visited

  • Medals

Posts posted by EnvakeoLugaria


  1. Just now, Nach said:

    Can you post this script I can help you if you want by ;) 

     

    Awesome!

     

    So, all that "Maglocks.sqf" contains is:      call OPTRE_fnc_PelicanAttachToPoints

    The function "OPTRE_fnc_PelicanAttachToPoints" has a .sqf elsewhere from the mod, it contains:

     

    _return = switch (_this select 0) do {

        // Supply Vehicles
        case "OPTRE_m1087_stallion_unsc":      { [0,-6,0.4] };
        case "OPTRE_m1015_mule_unsc":           { [0,-4.9,0.4] };
        case "OPTRE_M12_FAV_APC":              { [0,-3.2,0.4] };
        
        // Warthog
        case "OPTRE_M12_FAV":                  { [0,-4.9,0.1] };
        case "OPTRE_M12_FAV_black":          { [0,-4.9,0.1] };
        case "OPTRE_M12_FAV_Marine":          { [0,-4.9,0.1] };
        case "OPTRE_M12_FAV_snow":               { [0,-4.9,0.1] };
        case "OPTRE_M12_FAV_tan":               { [0,-4.9,0.1] };
                        
        case "OPTRE_M12_LRV":                   { [0,-4.9,0.1] };
        case "OPTRE_M12_LRV_black":          { [0,-4.9,0.1] };
        case "OPTRE_M12_LRV_Marine":          { [0,-4.9,0.1] };
        case "OPTRE_M12_LRV_snow":               { [0,-4.9,0.1] };
        case "OPTRE_M12_LRV_tan":               { [0,-4.9,0.1] };
                        
        case "OPTRE_M12A1_LRV":               { [0,-4.9,0.1] };
        case "OPTRE_M12A1_LRV_black":          { [0,-4.9,0.1] };
        case "OPTRE_M12A1_LRV_Marine":          { [0,-4.9,0.1] };        
        case "OPTRE_M12A1_LRV_snow":          { [0,-4.9,0.1] };
        case "OPTRE_M12A1_LRV_tan":          { [0,-4.9,0.1] };
                        
        case "OPTRE_M12G1_LRV":               { [0,-4.9,0.1] };            
        case "OPTRE_M12G1_LRV_black":          { [0,-4.9,0.1] };
        case "OPTRE_M12G1_LRV_Marine":          { [0,-4.9,0.1] };
        case "OPTRE_M12G1_LRV_snow":          { [0,-4.9,0.1] };        
        case "OPTRE_M12G1_LRV_tan":          { [0,-4.9,0.1] };
                        
        case "OPTRE_M12R_AA":                  { [0,-4.9,0.1] };
        case "OPTRE_M12R_AA_black":          { [0,-4.9,0.1] };    
        case "OPTRE_M12R_AA_Marine":          { [0,-4.9,0.1] };
        case "OPTRE_M12R_AA_snow":              { [0,-4.9,0.1] };
        case "OPTRE_M12R_AA_tan":              { [0,-4.9,0.1] };        
                        
        case "OPTRE_M813_TT":                   { [0,-4.9,0.1] };
        case "OPTRE_M813_TT_black":          { [0,-4.9,0.1] };
        case "OPTRE_M813_TT_Marine":          { [0,-4.9,0.1] };        
        case "OPTRE_M813_TT_snow":              { [0,-4.9,0.1] };
        case "OPTRE_M813_TT_tan":              { [0,-4.9,0.1] };        

        case "OPTRE_UNSC_falcon_black":      { [0,-6,-0.1] };
        case "OPTRE_UNSC_falcon_green":         { [0,-6,-0.1] };
        case "OPTRE_UNSC_falcon_snow":          { [0,-6,-0.1] };
        case "OPTRE_UNSC_falcon_tan":          { [0,-6,-0.1] };
                        
        default                               { [0,-4.9,0.1] }; 
    };
        

     

    It has pre-set x,y,z parameters for each of the vehicles in the mod.  I can get the MRAP/warthog to attach using names and triggers to run everything just like up top: 

     

    mrapName attachTo [heloName, ([(typeOf mrapName)] call OPTRE_fnc_PelicanAttachToPoints)]

     

    Thanks.


  2. 1 hour ago, Nach said:

    _allmrap = nearestObjects [player, ["O_MRAP_02_hmg_F","O_MRAP_02_gmg_F","O_MRAP_02_hmg_F" ], 999999]; // https://community.bistudio.com/wiki/Arma_3_CfgVehicles_EAST // for exemple class east
    {
     _trg = createTrigger["EmptyDetector",getPosATL _x];
     _trg setTriggerArea[150,150,0,false];
     _trg setTriggerActivation["any","PRESENT",false];
     _trg setTriggerStatements["this", "null =[] execVM 'yourscript.sqf',hint 'my trigger actived debug' ;", ""]; // "1st condition" , 2nd "on activate"  change "this" by>> "this && vehicle player isKindOf ""air"""   ---for the condition if is the player in fly
     
    }forEach _allmrap;

     

     

    So I gave the script a try, after a little messing around, the script runs, however, nothing happens...

    This is how I have it set up:

     

    _allWarthogs = nearestObjects [player, ["OPTRE_M12_FAV"], 999999];
    {
     _trg = createTrigger ["EmptyDetector",getPosATL _x];
     _trg setTriggerArea [150,150,0,false];
     _trg setTriggerActivation ["any","PRESENT",false];
     _trg setTriggerStatements ["this", "null =[] execVM 'MagLocks.sqf',hint 'Maglocks Activated' ;", ""];

    }forEach _allWarthogs;

     

    So, this is in an sqf. called "WarthogAttach.sqf", which I activate by an addAction on the helo.

     

    "Maglocks.sqf" is another .sqf, and contains: call  OPTRE_fnc_PelicanAttachToPoints;

     

    The hint appears, so I'm thinking the "Maglocks.sqf" didn't work correctly.

     

    Thank you guys for your answers so far!

     

     

    • Like 1

  3. I'll give it a try, thanks.

     

    The whole point of this is a sort of stop-gap measure until the devs for the OPTRE mod actually put this in.

    I want to be able have a persistant ALiVE campaign and spawn vehicles in Zeus.  I could just make 20 pairs and have an action on each set, but I'd rather not.

    So that's why I'm looking for a way to do this without any set-up on the vehicles before hand.  I don't know if this is really even possible, but normal sling loading is similar, right?

    I'm going to take a look at other sling loading scripts/whats actually in the game right now.


  4. Hey guys, I've been playing a bit of the OPTRE mod, and I've talked with one of their devs about a way to attach a vehicle to a helicopter.

    I have a bit of experience in the 3D editor, and I'm familiar with everything up to more advanced scripting.

    The way it works is it attaches the MRAP vehicle to the underside of the helicopter, no ropes or anything.

     

    The line looks like this, with ___Name being the vehicle names:   mrapName attachTo [heloName, ([(typeOf mrapName)] call OPTRE_fnc_PelicanAttachToPoints)]

     

    This works if you name the two vehicles, and activate the function, I've done a trigger and addAction, BUT, I want to find out how to run this WITHOUT having to name the vehicles before hand.

    I am guessing it would be some "find the ID of the MRAP, attachTo, find ID of helo" kinda thing.

    I would have to think normal sling loading has to do this to an extent, right? Find the closest vehicle, and attach the ropes...I just thought I'd ask if anyone knows where I could start looking for a way to do this.

     

    Thanks for any help

    -Envak

×