mirror of
https://github.com/rambo/arma3_missions.git
synced 2024-08-30 16:52:13 +00:00
Original unPBOd files
This commit is contained in:
commit
3e1bbce18c
20
helotraining.Altis/AASquad.sqf
Normal file
20
helotraining.Altis/AASquad.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
_centrePos = _this select 0;
|
||||
|
||||
_centreX = _centrePos select 0;
|
||||
_centrePos set [0, _centreX - 1000 + (floor random 500)];
|
||||
|
||||
_position = _centrePos findEmptyPosition [0,100];
|
||||
|
||||
_groupEnemy = createGroup east;
|
||||
"O_soldier_AA_F" createUnit [_position, _groupEnemy,"",0.9, "CORPORAL"];
|
||||
|
||||
|
||||
AAArray = AAArray + [_groupEnemy];
|
||||
|
||||
|
||||
_enemyCount = count AAArray;
|
||||
if (_enemyCount > 5) then
|
||||
{
|
||||
null = [(AAArray select 0), "aa"] execVM "deleteSquad.sqf";
|
||||
};
|
49
helotraining.Altis/briefing.sqf
Normal file
49
helotraining.Altis/briefing.sqf
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
// since we're working with the player object here, make sure it exists
|
||||
waitUntil { !isNil {player} };
|
||||
waitUntil { player == player };
|
||||
|
||||
switch (side player) do
|
||||
{
|
||||
|
||||
case WEST: // BLUFOR briefing goes here
|
||||
{
|
||||
|
||||
player createDiaryRecord ["Diary", ["I found a bug?",
|
||||
"No you didn't. Shhh."]];
|
||||
|
||||
player createDiaryRecord ["Diary", ["Does it end?",
|
||||
"Nope! The mission will continue on until you feel you've had enough training, at which point you can quit."]];
|
||||
|
||||
player createDiaryRecord ["Diary", ["How do I change the parameters?",
|
||||
"The parameters can be changed by hosting the mission as a multiplayer server (Multiplayer > New > LAN) and selecting the 'PARAMETERS' option in the top right.
|
||||
You can then tweak it to your hearts content!"]];
|
||||
|
||||
player createDiaryRecord ["Diary", ["Refuelling",
|
||||
"There is a refuelling truck at the air field which you can use to refill your tank if you begin to run low."]];
|
||||
|
||||
player createDiaryRecord ["Diary", ["Mission Objectives",
|
||||
"Select your chopper of choice and fly to the marked LZ. You'll be meeting up with fireteams who've requested EVAC and transporting them to other LZs. Watch out for enemy squads and anti-air troopers."]];
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
case EAST: // REDFOR briefing goes here
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here
|
||||
{
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
case CIVILIAN: // CIVILIAN briefing goes here
|
||||
{
|
||||
|
||||
|
||||
};
|
||||
};
|
41
helotraining.Altis/createObj.sqf
Normal file
41
helotraining.Altis/createObj.sqf
Normal file
@ -0,0 +1,41 @@
|
||||
//null = [target, [positionA, positionB, positionC...], previousLocation] execVM "createObj.sqf";
|
||||
|
||||
waitUntil {!(isNil "missionInitComplete")};
|
||||
|
||||
|
||||
target = _this select 0;
|
||||
lzLocs = _this select 1;
|
||||
prevLZ = _this select 2;
|
||||
|
||||
lzLoc = (lzLocs - [prevLZ]) call BIS_fnc_SelectRandom;
|
||||
|
||||
|
||||
|
||||
tsk1 = target createSimpleTask ["NextLZ"];
|
||||
tsk1 setSimpleTaskDescription ["Fly to and land at the next LZ", "Next LZ", "LZ"];
|
||||
tsk1 setSimpleTaskDestination (getPos lzLoc);
|
||||
target setCurrentTask tsk1;
|
||||
|
||||
trg = createTrigger["EmptyDetector",getPos lzLoc]; trg setTriggerArea[2000,300,0,false];
|
||||
trg setTriggerActivation["WEST","PRESENT",false];
|
||||
trg setTriggerTimeout [2.5, 2.5, 2.5, true];
|
||||
trg setTriggerStatements["(vehicle target != target) && ((vehicle target) in thislist) && (isTouchingGround (vehicle target))", "null = [trg, tsk1, target, lzLoc, lzLocs] execVM 'landingComplete.sqf'", ""];
|
||||
|
||||
null = [(getPos lzLoc), target] execVM 'createSquad.sqf';
|
||||
|
||||
//Make the LZ hot if the roll demands it
|
||||
if ((random 1) < hotLZChance) then
|
||||
{
|
||||
null = [(getPos lzLoc)] execVM 'enemySquad.sqf';
|
||||
};
|
||||
if ((random 1) < AAChance) then
|
||||
{
|
||||
null = [(getPos lzLoc)] execVM 'AASquad.sqf';
|
||||
};
|
||||
|
||||
landingComplete = false;
|
||||
|
||||
if (bSmoke) then
|
||||
{
|
||||
null = [(getPos lzLoc)] execVM 'spawnSmoke.sqf';
|
||||
};
|
12
helotraining.Altis/createSquad.sqf
Normal file
12
helotraining.Altis/createSquad.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
if (ferrying) exitWith {};
|
||||
|
||||
_spawnPos = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
_groupTaxi = createGroup west;
|
||||
"B_Soldier_F" createUnit [_spawnPos, _groupTaxi,"",0.5, "CORPORAL"];
|
||||
"B_Soldier_F" createUnit [_spawnPos, _groupTaxi,"",0.5, "PRIVATE"];
|
||||
"B_Soldier_F" createUnit [_spawnPos, _groupTaxi,"",0.5, "PRIVATE"];
|
||||
"B_Soldier_F" createUnit [_spawnPos, _groupTaxi,"",0.5, "PRIVATE"];
|
||||
|
||||
squadArray = squadArray + [_groupTaxi];
|
13
helotraining.Altis/deleteSquad.sqf
Normal file
13
helotraining.Altis/deleteSquad.sqf
Normal file
@ -0,0 +1,13 @@
|
||||
//if (!ferrying) exitWith {};
|
||||
_group = _this select 0;
|
||||
_side = _this select 1;
|
||||
|
||||
|
||||
switch (_side) do
|
||||
{
|
||||
case "west": {squadArray = squadArray - [_group]};
|
||||
case "east": {enemyArray = enemyArray - [_group]};
|
||||
case "aa": {AAArray = AAArray - [_group]};
|
||||
};
|
||||
|
||||
{deleteVehicle _x} forEach units _group;
|
64
helotraining.Altis/description.ext
Normal file
64
helotraining.Altis/description.ext
Normal file
@ -0,0 +1,64 @@
|
||||
onLoadIntroTime=false;
|
||||
onLoadMissionTime=false;
|
||||
disabledAI=1;
|
||||
debriefing=1;
|
||||
showGPS=1;
|
||||
Respawn = 3;
|
||||
RespawnDelay = 1;
|
||||
RespawnDialog = 0;
|
||||
enabledebugconsole = true;
|
||||
loadScreen = "main.jpg";
|
||||
author = Wibbler;
|
||||
onLoadName = Helicopter Training;
|
||||
//onLoadMission = wibble wibble wibble;
|
||||
|
||||
|
||||
//Parameters
|
||||
class Params
|
||||
{
|
||||
class DayTime
|
||||
{
|
||||
//paramsArray[0]
|
||||
title = "Time Of Day";
|
||||
values[] = {5,12,7,0,1};
|
||||
texts[] = {"Dawn","Midday","Dusk", "Midnight", "Random"};
|
||||
default = 12;
|
||||
};
|
||||
|
||||
class LZSize
|
||||
{
|
||||
//paramsArray[1]
|
||||
title = "LZ Size";
|
||||
values[] = {100,200,300,400,500,600,700,800,900,1000};
|
||||
texts[] = {"100m","200m","300m","400m","500m","600m","700m","800m","900m","1000m"};
|
||||
default = 300;
|
||||
};
|
||||
|
||||
class SmokeSetting
|
||||
{
|
||||
//paramsArray[2]
|
||||
title = "Smoke/Chemlights";
|
||||
values[] = {0,1};
|
||||
texts[] = {"Off", "On"};
|
||||
default = 1;
|
||||
};
|
||||
|
||||
class HotLZProbability
|
||||
{
|
||||
//paramsArray[3]
|
||||
title = "Hot LZ Chance";
|
||||
values[] = {0,20,50,80,100};
|
||||
texts[] = {"Never", "Low", "Medium", "High", "Always"};
|
||||
default = 50;
|
||||
};
|
||||
|
||||
class AAProbability
|
||||
{
|
||||
//paramsArray[4]
|
||||
title = "Anti Air Population";
|
||||
values[] = {0,10,20,50,100};
|
||||
texts[] = {"None", "Low", "Medium", "High", "Kill Me"};
|
||||
default = 10;
|
||||
};
|
||||
|
||||
};
|
15
helotraining.Altis/ejectSquad.sqf
Normal file
15
helotraining.Altis/ejectSquad.sqf
Normal file
@ -0,0 +1,15 @@
|
||||
if (!ferrying) exitWith {};
|
||||
|
||||
_group = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
|
||||
deleteWaypoint [_group,1];
|
||||
|
||||
{_x action["eject", vehicle _x]} forEach units _group;
|
||||
{unAssignVehicle _x} forEach units _group;
|
||||
{_x enableAI "TARGET"; _x enableAI "AUTOTARGET";} foreach units _group;
|
||||
|
||||
wp = _group addwaypoint [lz1,5,1];
|
||||
wp setwaypointType "MOVE";
|
||||
|
||||
ferrying = false;
|
20
helotraining.Altis/enemySquad.sqf
Normal file
20
helotraining.Altis/enemySquad.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
_centrePos = _this select 0;
|
||||
|
||||
_centreX = _centrePos select 0;
|
||||
_centrePos set [0, _centreX + 100 + (floor random 300)];
|
||||
|
||||
_position = _centrePos findEmptyPosition [0,100];
|
||||
|
||||
_groupEnemy = createGroup east;
|
||||
"O_Soldier_F" createUnit [_position, _groupEnemy,"",0.6, "CORPORAL"];
|
||||
"O_Soldier_F" createUnit [_position, _groupEnemy,"",0.1, "PRIVATE"];
|
||||
"O_soldier_M_F" createUnit [_position, _groupEnemy,"",0.3, "PRIVATE"];
|
||||
"O_soldier_AR_F" createUnit [_position, _groupEnemy,"",0.3, "PRIVATE"];
|
||||
"O_soldier_M_F" createUnit [_position, _groupEnemy,"",0.3, "PRIVATE"];
|
||||
"O_soldier_AR_F" createUnit [_position, _groupEnemy,"",0.3, "PRIVATE"];
|
||||
"O_soldier_M_F" createUnit [_position, _groupEnemy,"",0.3, "PRIVATE"];
|
||||
"O_soldier_AR_F" createUnit [_position, _groupEnemy,"",0.3, "PRIVATE"];
|
||||
"O_soldier_M_F" createUnit [_position, _groupEnemy,"",0.3, "PRIVATE"];
|
||||
"O_soldier_AR_F" createUnit [_position, _groupEnemy,"",0.3, "PRIVATE"];
|
||||
|
||||
enemyArray = enemyArray + [_groupEnemy];
|
40
helotraining.Altis/init.sqf
Normal file
40
helotraining.Altis/init.sqf
Normal file
@ -0,0 +1,40 @@
|
||||
null = execVM "briefing.sqf";
|
||||
|
||||
//Handle parameters
|
||||
|
||||
//Time of day
|
||||
_time = paramsArray select 0;
|
||||
if (_time != 1) then
|
||||
{
|
||||
skiptime _time;
|
||||
}
|
||||
else
|
||||
{
|
||||
skiptime (floor random 24);
|
||||
};
|
||||
|
||||
//LZ size
|
||||
lzSize = paramsArray select 1;
|
||||
publicVariable "lzSize";
|
||||
|
||||
//Smoke setting
|
||||
bSmoke = if ((paramsArray select 2) == 1) then {true} else {false};
|
||||
publicVariable "bSmoke";
|
||||
|
||||
//Hot LZ chance
|
||||
_hotLZParam = paramsArray select 3;
|
||||
hotLZChance = if (_hotLZParam > 0) then {_hotLZParam / 100} else {0.0};
|
||||
publicVariable "hotLZChance";
|
||||
|
||||
//Anti air chance
|
||||
_AAParam = paramsArray select 4;
|
||||
AAChance = if (_AAParam > 0) then {_AAParam / 100} else {0.0};
|
||||
publicVariable "AAChance";
|
||||
|
||||
squadArray = [];
|
||||
enemyArray = [];
|
||||
AAArray = [];
|
||||
|
||||
missionInitComplete = true;
|
||||
publicVariable "missionInitComplete";
|
||||
|
19
helotraining.Altis/initPlayer.sqf
Normal file
19
helotraining.Altis/initPlayer.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
_target = _this select 0;
|
||||
_lzCount = _this select 1;
|
||||
|
||||
lzList = [];
|
||||
|
||||
|
||||
_x = 0;
|
||||
while {(_x < _lzCount)} do
|
||||
{
|
||||
_lz = missionNamespace getVariable ("lz" + format["%1", _x + 1]);
|
||||
lzList = lzList + [_lz];
|
||||
_x = _x + 1;
|
||||
};
|
||||
|
||||
null = [_target, lzList, []] execVM "createObj.sqf";
|
||||
ferrying = false;
|
||||
_target allowDamage false;
|
||||
_target addItem "SatchelCharge_Remote_Mag";
|
||||
_target addweapon "NVGoggles";
|
37
helotraining.Altis/landingComplete.sqf
Normal file
37
helotraining.Altis/landingComplete.sqf
Normal file
@ -0,0 +1,37 @@
|
||||
//null = [trigger, task, player, previousLocation, locations] execVM "landingComplete.sqf";
|
||||
|
||||
_trg = _this select 0;
|
||||
_tsk = _this select 1;
|
||||
landedTarget = _this select 2;
|
||||
prevLZ = _this select 3;
|
||||
locs = _this select 4;
|
||||
|
||||
vehiclePlayer = vehicle landedTarget;
|
||||
|
||||
deletevehicle _trg;
|
||||
_tsk setTaskState "SUCCEEDED";
|
||||
hint 'Landing successful!';
|
||||
|
||||
_squadCount = count squadArray;
|
||||
_enemyCount = count enemyArray;
|
||||
null = [(squadArray select _squadCount - 1), vehiclePlayer] execVM 'ejectSquad.sqf';
|
||||
|
||||
if (_enemyCount > 1) then
|
||||
{
|
||||
null = [(enemyArray select 0), "east"] execVM "deleteSquad.sqf";
|
||||
};
|
||||
if (_squadCount > 1) then
|
||||
{
|
||||
null = [(squadArray select 0), "west"] execVM "deleteSquad.sqf";
|
||||
};
|
||||
|
||||
landingComplete = true;
|
||||
landedTarget removeSimpleTask _tsk;
|
||||
|
||||
null = [vehiclePlayer, (squadArray select _squadCount -1)] execVM "loadSquad.sqf";
|
||||
|
||||
trgLoaded = createTrigger["EmptyDetector",getPos lzLoc];
|
||||
trgLoaded setTriggerArea[40,5,0,false];
|
||||
trgLoaded setTriggerActivation["NONE","PRESENT",false];
|
||||
trgLoaded setTriggerTimeout [3, 3, 3, true];
|
||||
trgLoaded setTriggerStatements["squadLoaded", "null = [landedTarget, locs, prevLZ] execVM 'createObj.sqf'; hint 'Fly to the next LZ!';", ""];
|
33
helotraining.Altis/loadSquad.sqf
Normal file
33
helotraining.Altis/loadSquad.sqf
Normal file
@ -0,0 +1,33 @@
|
||||
if (ferrying) exitWith {};
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_group = _this select 1;
|
||||
|
||||
if (ferrying) exitWith {};
|
||||
|
||||
squadLoaded = false;
|
||||
if ({alive _x} count units _group == 0)
|
||||
then
|
||||
{
|
||||
squadLoaded = true;
|
||||
exit;
|
||||
};
|
||||
|
||||
{_x assignAsCargo _vehicle} foreach units _group;
|
||||
{[_x] ordergetin true} foreach units _group;
|
||||
{_x disableAI "TARGET"; _x disableAI "AUTOTARGET";} foreach units _group;
|
||||
|
||||
wp = _group addwaypoint [_vehicle,5,1];
|
||||
wp setwaypointType "GETIN";
|
||||
|
||||
while {not squadLoaded} do
|
||||
{
|
||||
if ({alive _x} count units _group == {_x in _vehicle} count units _group)
|
||||
then
|
||||
{
|
||||
squadLoaded=true;
|
||||
};
|
||||
sleep 2;
|
||||
};
|
||||
ferrying = true;
|
||||
|
BIN
helotraining.Altis/main.jpg
Normal file
BIN
helotraining.Altis/main.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
13
helotraining.Altis/manualRespawn.sqf
Normal file
13
helotraining.Altis/manualRespawn.sqf
Normal file
@ -0,0 +1,13 @@
|
||||
_vehicle = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
_respawnPos = missionNamespace getVariable ("respawn" + format["%1", _vehicle]);
|
||||
|
||||
|
||||
if (alive _vehicle)
|
||||
then
|
||||
{
|
||||
_vehicle setPos (getPos _respawnPos);
|
||||
_vehicle setDamage 0;
|
||||
_target setPos (getPos _respawnPos);
|
||||
}
|
2484
helotraining.Altis/mission.sqm
Normal file
2484
helotraining.Altis/mission.sqm
Normal file
File diff suppressed because it is too large
Load Diff
7
helotraining.Altis/repair.sqf
Normal file
7
helotraining.Altis/repair.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
_vehicle = _this select 0;
|
||||
|
||||
if (alive _vehicle)
|
||||
then
|
||||
{
|
||||
_vehicle setDamage 0;
|
||||
}
|
23
helotraining.Altis/spawnSmoke.sqf
Normal file
23
helotraining.Altis/spawnSmoke.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
_smokeLoc = _this select 0;
|
||||
|
||||
|
||||
while {!landingComplete} do
|
||||
{
|
||||
_hour = daytime;
|
||||
if (_hour > 5 && _hour < 19) then
|
||||
{
|
||||
_smoke= "SmokeShellGreen" createVehicle _smokeLoc;
|
||||
sleep 40;
|
||||
deleteVehicle _smoke;
|
||||
}
|
||||
else
|
||||
{
|
||||
_chemlight= "Chemlight_green" createVehicle _smokeLoc;
|
||||
_smoke= "SmokeShellGreen" createVehicle _smokeLoc;
|
||||
sleep 40;
|
||||
deleteVehicle _chemlight;
|
||||
deleteVehicle _smoke;
|
||||
};
|
||||
|
||||
}
|
6
helotraining.Altis/vehicleInit.sqf
Normal file
6
helotraining.Altis/vehicleInit.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
_vehicle = _this select 0;
|
||||
_pilot = _this select 1;
|
||||
|
||||
_vehicle addAction ["Repair", "repair.sqf"];
|
||||
_vehicle addAction ["Respawn", "manualRespawn.sqf", [_vehicle, _pilot]];
|
||||
_pilot addRating 9999;
|
Loading…
Reference in New Issue
Block a user