Jump to content
Firewall-BR

Need help with a Mk-21 Centurion SAM in a Wasteland mission

Recommended Posts

Hi.

I'm working in a script mission to a event for our Wasteland server. Not big deal: a naval base with a couple of vehicles, divers and, in a pier, I put some autonomous Centurion, Spartan and Pretorian.
Everything works fine, except by these 3 guys. I was able to add them to the group, so, they show as part of the vehicles mission (with a red line), but don't move, don't attack!
I have used them before in same server, placing it in a USS carrier thru the Editor (so, saved in mission.sqm). The only trick was force them to be CIVILIAN, so, they attacked everyone else (Bluefor, Upfor and Ind).
But now, I'm struggling to have the same in a SCRIPT.sqf that will run with some other missions.

Please help! :)

Thanks in advance,

Share this post


Link to post
Share on other sites

Try using createVehicleCrew on them.

Share this post


Link to post
Share on other sites
17 hours ago, Tajin said:

Try using createVehicleCrew on them.

 

Hey, works fine!!

In fact, I was already calling a func with createVehicleCrew, but your tip pointed me to the way I was creating the UAV, and that was the issue.

 

Thanks,

 

Follows a piece of my code:

    _createUAVVehicle =
    {
        private ["_type", "_position", "_direction", "_vehicle", "_vehArray"];

        _type = _this select 0;
        _position = _this select 1;
        _direction = _this select 2;
        
        _vehArray = [_missionPos, 0, _type, CIVILIAN] call BIS_fnc_spawnVehicle;
                
        _vehicle = (_vehArray select 0);
   
        createVehicleCrew _vehicle;        
        _vehicle setVariable ["R3F_LOG_disabled", true, true];

        [_vehicle] call vehicleSetup;

        _vehicle setDir _direction;
        _vehicle setPos _position;
        
        _vehicle
    };    

 

    _vehicles =
    [
        [_veh1, _calcMarkers select 0, 0] call _createVehicle,
        [_veh2, _calcMarkers select 1, 0] call _createVehicle,
        [_veh3, _calcMarkers select 2, 0] call _createVehicle,        
        [_veh4, _calcMarkers select 3, 0] call _createVehicle,
        [_veh5, _calcMarkers select 4, 0] call _createVehicle,
        [_veh6, _calcMarkers select 5, 0] call _createVehicle,
        [_veh7, [(getpos _pier select 0), (getpos _pier select 1) + 6, (getpos _pier select 2) + 1], 270] call _createUAVVehicle, // uav
        [_veh8, [(getpos _pier select 0), (getpos _pier select 1) - 6, (getpos _pier select 2) + 1], 90] call _createUAVVehicle // uav
    ];

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×