Sling loaded delivery

This commit is contained in:
Benjamin Kyd
2019-05-09 01:11:48 +01:00
parent dbedfcfe82
commit ac8af0fc77
7 changed files with 1788 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
/**
* Copyright© Benjamin Kyd 2019
* fn_getDeliveryPoint.sqf
*
* Returns "random" coordinate as delivery point for the mission
*
* TODO: Make it actually random and _only_ available to spawn on land
*/
private _numItems = 22; // Number of elements in _deliveryPointArray - microoptimization
private _deliveryPointArray = [
[21770,4911.36,0.681143],
[23203.9,7446.1,0.012188],
[11704,22809,0],
[2844,20279.7,0],
[14504.4,23426.4,0.0445493],
[3030.39,10216,0.602249],
[6357,2082,0.1],
[7198,2533,0.1],
[7226,2187,0.1],
[8045,2835,0.1],
[8577,2320,0.1],
[9286,1902,0.1],
[9840,1786,0.1],
[10466,1886,0.1],
[10243,1576,0.1],
[10857,2275,0.1],
[11939,3402,0.1],
[11105,3009,0.1],
[13509,6166,0.1],
[13081,7804,0.1],
[12940,9326,0.1],
[13170,10292,0.1]
];
private _ret = _deliveryPointArray select floor random _numItems;
_ret;

View File

@@ -0,0 +1,83 @@
/**
* Copyright© Benjamin Kyd 2019
* fn_triggerStart.sqf
*
* Triggers the start of the mission and starts
* all neccesary systems for the mission
*/
// Throws missing ';' error at compiletime
// if (gMissionStarted == true) then {
// exitWith {
// hint "You have already started a mission! Complete that first!";
// };
// };
gMissionStarted = true;
private _deliveryPoint = [] call RR_fnc_getDeliveryPoint;
private _deliveryPointMarkerR = createMarkerLocal ["Delivery Point Radius", _deliveryPoint];
_deliveryPointMarkerR setMarkerShapeLocal "ELLIPSE";
_deliveryPointMarkerR setMarkerSizeLocal [500, 500];
_deliveryPointMarkerR setMarkerColorLocal "ColorRed";
private _deliveryPointMarker = createMarkerLocal ["Delivery Point", _deliveryPoint];
_deliveryPointMarker setMarkerTypeLocal "mil_objective";
_deliveryPointMarker setMarkerTextLocal "Delivery Point";
// Get distance to mission from player, update while mission goes on
private _distanceToPoint = 0;
// Heli spawm (Hard coded eww) [10064.9,12045.4,0.00141716]
// Lookup table of available shit
private _helis = [
["B_Heli_Transport_03_unarmed_F", "Huron"],
["B_Heli_Transport_03_unarmed_green_F", "Huron"],
["O_Heli_Transport_04_box_F", "Taru"],
["O_Heli_Transport_04_covered_F", "Taru"]
];
private _missionHeliIndex = floor random count _helis;
private _missionHeliClass = _helis select _missionHeliIndex select 0;
private _missionHeliName = _helis select _missionHeliIndex select 1;
gMissionHeli = createVehicle [_missionHeliClass, [10064.9,12045.4,0.00141716], [], 0];
gMissionHeli setVariable ["RR_Mission_Heli", true];
// Transport Item spawm (Hard coded eewwwwwwwww) [10085.4,12076.8,0.00141335]
private _items = [
["O_T_Quadbike_01_ghex_F", "Quadbike"],
["C_Hatchback_01_F", "Hatchback"],
["C_Hatchback_01_sport_F", "Hatchback Sport"],
["C_SUV_01_F", "SUV"],
["C_Offroad_02_unarmed_F", "Unarmed Offroad"],
["C_Van_01_box_F", "Truck Boxer"],
["C_Van_01_transport_F", "Truck"],
["B_MRAP_01_F", "Hunter"],
["O_MRAP_02_F", "IFRIT"],
["IG_supplyCrate_F", "Ammo Box"]
];
private _missionItemIndex = floor random count _items;
private _missionItemClass = _items select _missionItemIndex select 0;
private _missionItemName = _items select _missionItemIndex select 1;
gMissionDelivery = createVehicle [_missionItemClass, [10085.4,12076.8,0.00141335], [], 0];
gMissionDelivery setVariable ["RR_Mission_Item", true];
// Sling to vehicle
gMissionHeli setSlingLoad gMissionDelivery;
[
player, "RR_Delivery_Task",
[format ["Deliver %1 to the marker", _missionItemName], "Delivery Mission", "Deliver Here"],
_deliveryPoint, "ASSIGNED", 1,
true, "ASSIGNED", true
] call BIS_fnc_taskCreate;
hint format ["Delivery Mission Started! Deliver the %1 to the marker on the map!", _missionItemName];

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
disableAI = 1;
#include "defines.hpp"
class cfgFunctions {
#include "functions.hpp"
};

View File

@@ -0,0 +1,8 @@
class RR {
tag = "RR";
class functions {
file = "RR_functions";
class triggerStart {};
class getDeliveryPoint {};
};
};

View File

@@ -0,0 +1,2 @@
gMissionStarted = false;

View File

@@ -0,0 +1,202 @@
version=53;
class EditorData
{
moveGridStep=1;
angleGridStep=0.2617994;
scaleGridStep=1;
autoGroupingDist=10;
toggles=1;
class ItemIDProvider
{
nextID=3;
};
class Camera
{
pos[]={10092.601,17.288755,12033.088};
dir[]={-0.52590108,-0.63688552,0.56386817};
up[]={-0.43440279,0.77094764,0.46576494};
aside[]={0.73134863,-5.9989907e-007,0.68211144};
};
};
binarizationWanted=0;
addons[]=
{
"A3_Structures_F_Civ_InfoBoards",
"A3_Characters_F",
"A3_Weapons_F_Mark_LongRangeRifles_DMR_03",
"A3_Weapons_F_Exp",
"A3_Weapons_F_Acc",
"A3_Weapons_F_Mark_Acc",
"A3_Weapons_F",
"A3_Weapons_F_Items"
};
class AddonsMetaData
{
class List
{
items=5;
class Item0
{
className="A3_Structures_F";
name="Arma 3 - Buildings and Structures";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
class Item1
{
className="A3_Characters_F";
name="Arma 3 Alpha - Characters and Clothing";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
class Item2
{
className="A3_Weapons_F_Mark";
name="Arma 3 Marksmen - Weapons and Accessories";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
class Item3
{
className="A3_Weapons_F_Exp";
name="Arma 3 Apex - Weapons and Accessories";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
class Item4
{
className="A3_Weapons_F";
name="Arma 3 Alpha - Weapons and Accessories";
author="Bohemia Interactive";
url="https://www.arma3.com";
};
};
};
randomSeed=11229197;
class ScenarioData
{
author="plane000";
};
class Mission
{
class Intel
{
timeOfChanges=1800.0002;
startWeather=0.30000001;
startWind=0.1;
startWaves=0.1;
forecastWeather=0.30000001;
forecastWind=0.1;
forecastWaves=0.1;
forecastLightnings=0.1;
year=2035;
month=6;
day=24;
hour=12;
minute=0;
startFogDecay=0.014;
forecastFogDecay=0.014;
};
class Entities
{
items=2;
class Item0
{
dataType="Object";
class PositionInfo
{
position[]={10085.967,13.467333,12044.893};
angles[]={6.249867,5.5562901,6.2378764};
};
side="Empty";
flags=4;
class Attributes
{
init="this addAction [" \n " ""Start Mission"", RR_fnc_triggerStart" \n "];";
};
id=0;
type="Land_Noticeboard_F";
};
class Item1
{
dataType="Group";
side="West";
class Entities
{
items=1;
class Item0
{
dataType="Object";
class PositionInfo
{
position[]={10086.731,12.405762,12037.962};
angles[]={0,5.4903727,0};
};
side="West";
flags=7;
class Attributes
{
isPlayer=1;
class Inventory
{
class primaryWeapon
{
name="srifle_DMR_03_F";
optics="optic_Arco_blk_F";
flashlight="acc_flashlight";
underBarrel="bipod_01_F_blk";
class primaryMuzzleMag
{
name="20Rnd_762x51_Mag";
ammoLeft=20;
};
};
class uniform
{
typeName="U_BG_Guerilla3_1";
isBackpack=0;
class ItemCargo
{
items=1;
class Item0
{
name="FirstAidKit";
count=1;
};
};
};
class vest
{
typeName="V_PlateCarrierH_CTRG";
isBackpack=0;
class MagazineCargo
{
items=1;
class Item0
{
name="20Rnd_762x51_Mag";
count=11;
ammoLeft=20;
};
};
};
map="ItemMap";
compass="ItemCompass";
watch="ItemWatch";
radio="ItemRadio";
goggles="G_Bandanna_aviator";
hmd="NVGoggles";
headgear="H_HelmetB_desert";
};
};
id=2;
type="B_soldier_M_F";
};
};
class Attributes
{
};
id=1;
};
};
};