Adding Jet to Hostile Jet Mission

Adding Jet to Hostile Jet Mission

« posted: Jun 28, 2015, 01:22 AM »
Not sure what I'm leaving out. Want to add 1 or 2 more Jets to the Mission. Thanks for the help. I'm trying to learn all this.
Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Name: mission_HostileJet.sqf
// @file Author: JoSchaap, AgentRev, LouD

if (!isServer) exitwith {};
#include "extraMissionDefines.sqf";

private ["_planeChoices", "_convoyVeh", "_veh1", "_veh2", "_createVehicle", "_vehicles", "_leader", "_speedMode", "_waypoint", "_vehicleName", "_numWaypoints", "_cash", "_boxes1", "_currBox1", "_boxes2", "_currBox2", "_box1", "_box2"];

_setupVars =
{
_missionType = "Hostile Jet";
_locationsArray = nil; // locations are generated on the fly from towns
};

_setupObjects =
{
_missionPos = markerPos (((call cityList) call BIS_fnc_selectRandom) select 0);

_planeChoices =
[
["B_Plane_CAS_01_F"],
["O_Plane_CAS_02_F"]
];

_convoyVeh = _planeChoices call BIS_fnc_selectRandom;

_veh1 = _convoyVeh select 0;
_veh2 = _convoyVeh select 1;

_createVehicle =
{
private ["_type","_position","_direction","_vehicle","_soldier"];

_type = _this select 0;
_position = _this select 1;
_direction = _this select 2;


_vehicle = createVehicle [_type, _position, [], 0, "FLY"]; // Added to make it fly
_vehicle setVariable ["R3F_LOG_disabled", true, true];
_vel = [velocity _vehicle, -(_direction)] call BIS_fnc_rotateVector2D; // Added to make it fly
_vehicle setDir _direction;
_vehicle setVelocity _vel; // Added to make it fly
_vehicle setVariable [call vChecksum, true, false];
_aiGroup addVehicle _vehicle;

// add pilot
_soldier = [_aiGroup, _position] call createRandomPilot;
_soldier moveInDriver _vehicle;
// lock the vehicle untill the mission is finished and initialize cleanup on it


[_vehicle, _aiGroup] spawn checkMissionVehicleLock;
_vehicle
};

_aiGroup = createGroup CIVILIAN;

_vehicles = [];
_vehicles set [0, [_veh1,[14321.6,15857.7,0], 14, _aiGroup] call _createVehicle]; // static value update when porting to different maps
_vehicles set [1, [_veh2,[14421.6,15957.7,0], 14, _aiGroup] call _createVehicle]; // static value update when porting to different maps

_leader = effectiveCommander (_vehicles select 0);
_aiGroup selectLeader _leader;
_leader setRank "LIEUTENANT";

_aiGroup setCombatMode "RED";
_aiGroup setBehaviour "COMBAT";
_aiGroup setFormation "STAG COLUMN";

_speedMode = if (missionDifficultyHard) then { "NORMAL" } else { "LIMITED" };

// behaviour on waypoints
{
_waypoint = _aiGroup addWaypoint [markerPos (_x select 0), 0];
_waypoint setWaypointType "MOVE";
_waypoint setWaypointCompletionRadius 55;
_waypoint setWaypointCombatMode "RED";
_waypoint setWaypointBehaviour "COMBAT";
_waypoint setWaypointFormation "STAG COLUMN";
_waypoint setWaypointSpeed _speedMode;
} forEach ((call cityList) call BIS_fnc_arrayShuffle);

_missionPos = getPosATL leader _aiGroup;

_missionPicture = getText (configFile >> "CfgVehicles" >> _veh1 >> "picture");
_vehicleName = getText (configFile >> "CfgVehicles" >> _veh1 >> "displayName");
_missionHintText = format ["An armed <t color='%2'>%1</t> is patrolling the island. Shoot it down and kill the pilot to recover the money and weapons!", _vehicleName, extraMissionColor];

_numWaypoints = count waypoints _aiGroup;
};

_waitUntilMarkerPos = {getPosATL _leader};
_waitUntilExec = nil;
_waitUntilCondition = {currentWaypoint _aiGroup >= _numWaypoints};

_failedExec = nil;

// _vehicles are automatically deleted or unlocked in missionProcessor depending on the outcome

_successExec =
{
// Mission completed

//Money
for "_i" from 1 to 10 do
{
_cash = createVehicle ["Land_Money_F", _lastPos, [], 5, "None"];
_cash setPos ([_lastPos, [[2 + random 3,0,0], random 360] call BIS_fnc_rotateVector2D] call BIS_fnc_vectorAdd);
_cash setDir random 360;
_cash setVariable ["cmoney", 2500, true];
_cash setVariable ["owner", "world", true];
};

_Boxes1 = ["Box_IND_Wps_F","Box_East_Wps_F","Box_NATO_Wps_F","Box_NATO_AmmoOrd_F","Box_NATO_Grenades_F","Box_East_WpsLaunch_F","Box_NATO_WpsLaunch_F","Box_East_WpsSpecial_F","Box_NATO_WpsSpecial_F"];
_currBox1 = _Boxes1 call BIS_fnc_selectRandom;
_box1 = createVehicle [_currBox1, _lastPos, [], 2, "None"];
_box1 setDir random 360;
_box1 allowDamage false;

_Boxes2 = ["Box_IND_Wps_F","Box_East_Wps_F","Box_NATO_Wps_F","Box_NATO_AmmoOrd_F","Box_NATO_Grenades_F","Box_East_WpsLaunch_F","Box_NATO_WpsLaunch_F","Box_East_WpsSpecial_F","Box_NATO_WpsSpecial_F"];
_currBox2 = _Boxes2 call BIS_fnc_selectRandom;
_box2 = createVehicle [_currBox2, _lastPos, [], 2, "None"];
_box2 setDir random 360;
_box2 allowDamage false;

{ _x setVariable ["R3F_LOG_disabled", false, true] } forEach [_box1, _box2];

_successHintMessage = "The sky is clear again, the enemy patrol was taken out! Ammo crates and LOTS of money have fallen near the pilot.";
};

_this call extraMissionProcessor;
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Adding Jet to Hostile Jet Mission

« Reply #2 posted: Jun 28, 2015, 03:32 PM »
LouD, I added 3Dmarkers and its installed properly but anti hack is blocking it, RPT shows this
Code: [Select]
"ANTI-HACK - Blocked remote execution: params=["BIS_fnc_spawn",B Alpha 1-2,false,false] args=[["_USER_DEFINED #2/0"],{
if (!hasInterface) exitWith {};

waitUntil {missionNamespace getVariable ["3Dmarkers_intialized", false]};

_this spawn BH_fnc_mkr3D;
}]"

Re: Adding Jet to Hostile Jet Mission

« Reply #3 posted: Jun 28, 2015, 04:04 PM »
Here's my filterExecAttempt code
Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Version: 1.0
// @file Name: filterExecAttempt.sqf
// @file Author: AgentRev
// @file Created: 14/07/2013 13:10

private "_packetName";
_packetName = [_this, 0, "", [""]] call BIS_fnc_param;

if (_packetName == "BIS_fnc_MP_packet") then
{
private ["_values", "_args", "_function", "_whitelisted", "_filePath", "_argsType", "_argsStr", "_buffer"];

_values = [_this, 1, [], [[]]] call BIS_fnc_param;

if (count _values < 3) exitWith {};

_args = [_values, 1, []] call BIS_fnc_param;
_function = [_values, 2, "", [""]] call BIS_fnc_param;
_whitelisted = false;

if (_function == "BIS_fnc_execVM") then
{
_filePath = if (typeName _args == "STRING") then { _args } else { [_args, 1, "", [""]] call BIS_fnc_param };

{
if (_filePath == _x) exitWith
{
_whitelisted = true;
};
}
forEach
[

"client\functions\defineServerRules.sqf",
"territory\client\updateTerritoryMarkers.sqf",
"addons\3D_Markers\3Dmarkers.sqf",
"initPlayerServer.sqf"
];
}
else
{
{
if (_function == _x) exitWith
{
_whitelisted = true;
};
}
forEach
[
"BIS_fnc_effectKilledAirDestruction",
"BIS_fnc_effectKilledAirDestructionStage2",
"BIS_fnc_effectKilledSecondaries",
"BH_fnc_mkr3D",
"BH_fnc_mkr3D_VON",
"BIS_fnc_objectVar"/*,
"JTS_FNC_SENT"*/ // PM Compact by JTS
];

if (!_whitelisted) then
{
{
if (_function select [0, count _x] == _x) exitWith
{
_whitelisted = true;
};
}
forEach
[
"APOC_srv_",
                "A3W_fnc_",
"mf_remote_"
];
};
};

if (_whitelisted) then
{
_this call BIS_fnc_MPexec;
}
else
{
if (isServer) then
{
BIS_fnc_MP_packet = [];
publicVariable "BIS_fnc_MP_packet";

_argsType = toUpper typeName _args;
_argsStr = if (_argsType == "STRING") then { "'" + _args + "'" } else { if (_argsType in ["BOOL","SCALAR","ARRAY","SIDE"]) then { str _args } else { "(" + str _args + ")" } };
_buffer = toArray ("ANTI-HACK - Blocked remote execution: params=" + str (_values select [2, count _values - 2]) + " args=" + _argsStr);

while {count _buffer > 0} do
{
diag_log toString (_buffer select [0, 1021]);
_buffer deleteRange [0, 1021];
};
};
};
};

Re: Adding Jet to Hostile Jet Mission

« Reply #4 posted: Jun 28, 2015, 04:13 PM »
Fixed it!!! Thanks for all ya"ll help. I'm slowly learning