Skip to content

Commit

Permalink
fixes and features
Browse files Browse the repository at this point in the history
added random weapon caches,
added non functionable timer
added parameter
added some loadout
and more
  • Loading branch information
nomisum committed Jul 19, 2014
1 parent 609956a commit 53baf61
Show file tree
Hide file tree
Showing 9 changed files with 916 additions and 563 deletions.
130 changes: 35 additions & 95 deletions SpoiledStashV3.Stratis/description.ext
Expand Up @@ -3,114 +3,54 @@ onLoadName = "Spoiled Stash";
onLoadMission = "Special forces are tasked to destroy terrorist weapon caches.";
loadScreen = "spoiled.paa";

respawn = "BASE";
respawnOnStart = 0;
respawnDelay = 3;

class Header
{
gameType = Coop; // Game type, see 'class' columns in the table below
minPlayers = 3; //min # of players the mission supports
maxPlayers = 13; //max # of players the mission supports
};

enableDebugConsole = 0;
enableDebugConsole = 1;

class CfgSounds
class Params
{
sounds[] = {};
class mScream1
{
name = "mScream1";
sound[] = {"Sound\mScream\Scream_01.ogg", db+10, 1, 100};
titles[] = {};
};
class mScream2
{
name = "mScream2";
sound[] = {"Sound\mScream\Scream_02.ogg", db+10, 1, 100};
titles[] = {};
};
class mScream3
{
name = "mScream3";
sound[] = {"Sound\mScream\Scream_03.ogg", db+10, 1, 100};
titles[] = {};
};
class mScream4
{
name = "mScream4";
sound[] = {"Sound\mScream\Scream_04.ogg", db+10, 1, 100};
titles[] = {};
class TimeOfDay {
title = "Time of Day";
values[] = {3,8,14,19};
texts[] = {"Night","Morning","Midday","Dusk"};
default = 19;
};
class mScream5
{
name = "mScream5";
sound[] = {"Sound\mScream\Scream_05.ogg", db+10, 1, 100};
titles[] = {};
};
class mScream6
{
name = "mScream6";
sound[] = {"Sound\mScream\Scream_06.ogg", db+10, 1, 100};
titles[] = {};
};
class mScream7
{
name = "mScream7";
sound[] = {"Sound\mScream\Scream_07.ogg", db+10, 1, 100};
titles[] = {};

class TimeLimit {
Title = "Mission Time Limit";
values[] = {190,2760,3600,4500,5400};
texts[] = {"3 min (DEBUG)","45 min","60 min","75 min","90 min"};
default = 2760;
};
class mScream8
{
name = "mScream8";
sound[] = {"Sound\mScream\Scream_08.ogg", db+10, 1, 100};
titles[] = {};

class TimeBonus {
Title = "Time Bonus for every destroyed Weapon Cache";
values[] = {0,300,600,900};
texts[] = {"No Bonus","5 min","10 min","15 min"};
default = 600;
};

class fScream1
{
name = "fScream1";
sound[] = {"Sound\fScream\scream_01.ogg", db+10, 1, 100};
titles[] = {};
};
class fScream2
{
name = "fScream2";
sound[] = {"Sound\fScream\scream_02.ogg", db+10, 1, 100};
titles[] = {};
};
class fScream3
{
name = "fScream3";
sound[] = {"Sound\fScream\scream_03.ogg", db+10, 1, 100};
titles[] = {};
};
class fScream4
{
name = "fScream4";
sound[] = {"Sound\fScream\scream_04.ogg", db+10, 1, 100};
titles[] = {};
};
class fScream5
{
name = "fScream5";
sound[] = {"Sound\fScream\scream_05.ogg", db+10, 1, 100};
titles[] = {};
};
class fScream6
{
name = "fScream6";
sound[] = {"Sound\fScream\scream_06.ogg", db+10, 1, 100};
titles[] = {};
};
class fScream7
{
name = "fScream7";
sound[] = {"Sound\fScream\scream_07.ogg", db+10, 1, 100};
titles[] = {};
};
class fScream8
{
name = "fScream8";
sound[] = {"Sound\fScream\scream_08.ogg", db+10, 1, 100};
titles[] = {};
class HackingTime {
Title = "Time Resistance needs to hack into radio tower";
values[] = {3,10,20,30};
texts[] = {"3 s","10 s","20 s","30 s"};
default = 10;
};

class AllowJIP {
Title = "Allow JIP after mission start (triggers when Government leaves starting area)";
values[] = {true,false};
texts[] = {"Yes","No"};
default = true;
};
};
};
16 changes: 16 additions & 0 deletions SpoiledStashV3.Stratis/destroy_supplies.sqf
@@ -0,0 +1,16 @@
_pos = _this select 0;
_target = _this select 1;

_target setDamage 1;bomb="M_Mo_120mm_AT_LG" createVehicle (_pos);sleep 0.3;bomb2="HelicopterExploSmall" createVehicle (_pos);sleep 0.2;bomb2="Bo_GBU12_LGB" createVehicle (_pos);sleep 1;bomb="M_Mo_120mm_AT_LG" createVehicle (_pos);deletevehicle _target;



END_TIME = END_TIME + bonus_time;
publicvariable "END_TIME";
hint format["Bonus Time added: %1 mikes",bonus_time/60];
sleep 7;
SHOW_TIME = true;
publicVariable "SHOW_TIME";
sleep 10;
SHOW_TIME = false;
publicVariable "SHOW_TIME";
16 changes: 16 additions & 0 deletions SpoiledStashV3.Stratis/end/timeout.sqf
@@ -0,0 +1,16 @@
if (side player == opfor || side player == civilian) then {
"dynamicBlur" ppEffectEnable true; // enables ppeffect
"dynamicBlur" ppEffectAdjust [20]; // intensity of blur
"dynamicBlur" ppEffectCommit 10; // time till vision is fully blurred
titleText ["YES! WE SURVIVED THE MISSION TIME LIMIT.", "PLAIN",30];
sleep 10;
endMission "END1";
} else
{
"dynamicBlur" ppEffectEnable true; // enables ppeffect
"dynamicBlur" ppEffectAdjust [20]; // intensity of blur
"dynamicBlur" ppEffectCommit 10; // time till vision is fully blurred
titleText ["OH NO. TIME HAS SLIPPED THROUGH OUR FINGERS...", "PLAIN",30];
sleep 10;
endMission "LOSER";
};
151 changes: 143 additions & 8 deletions SpoiledStashV3.Stratis/init.sqf
@@ -1,22 +1,88 @@
{_x setMarkerAlphaLocal 0} foreach ["civplace1"];
if (!(side player == independent)) then {
trackingPrecision = 20;

randomize_coord = {
_this + random(trackingPrecision * 2) - trackingPrecision
};

randomize_pos =
{
private ["_randomizedPos", "_trueX", "_trueY"];

_trueX = _this select 0;
_trueY = _this select 1;

_randomizedPos = [
_trueX call randomize_coord,
_trueY call randomize_coord,
_this select 2
];

_randomizedPos
};

_markerPos = (getPos supplies_south) call randomize_pos;
"cache_south" setMarkerPos _markerPos;
_markerPos = (getPos supplies_west) call randomize_pos;
"cache_west" setMarkerPos _markerPos;
_markerPos = (getPos supplies_north) call randomize_pos;
"cache_north" setMarkerPos _markerPos;

if (!(side player == independent)) then {
"mrkGovernmentStart" setMarkerAlphaLocal 0;
"mrkGovernmentAttack" setMarkerAlphaLocal 0;
"mrkGovernmentStart" setMarkerAlphaLocal 0;
"mrkGovernmentText" setMarkerAlphaLocal 0;
"mrkResistanceObjective1" setMarkerPos (getPos supplies_south);
"mrkResistanceObjective2" setMarkerPos (getPos supplies_west);
"mrkResistanceObjective3" setMarkerPos (getPos supplies_north);
}
else {
"mrkResistanceObjective1" setMarkerAlphaLocal 0;;
"mrkResistanceObjective2" setMarkerAlphaLocal 0;;
"mrkResistanceObjective3" setMarkerAlphaLocal 0;;
"mrkResistanceObjective1" setMarkerAlphaLocal 0;
"mrkResistanceObjective2" setMarkerAlphaLocal 0;
"mrkResistanceObjective3" setMarkerAlphaLocal 0;
"mrkResistanceStart" setMarkerAlphaLocal 0;
};



tf_no_auto_long_range_radio = true;
[] execVM "zlt_fieldrepair.sqf";


SHOW_TIME = false;
publicVariable "SHOW_TIME";

current_frequency = "";
publicvariable "current_frequency";
publicVariable "current_frequency";

mission_start = false;
publicVariable "mission_start";

bonus_time = (paramsarray select 2);
publicVariable "bonus_time";

hacking_time = (paramsarray select 3);
publicVariable "hacking_time";

jip_disabled = (paramsarray select 4);
publicVariable "jip_disabled";

ELAPSED_TIME = 0;

tickTime_ausgleich = 0;

titleCut ["", "BLACK FADED", 999];
// TIME MANAGEMENT
skiptime (((paramsarray select 0) - daytime + 24) % 24);
END_TIME = (paramsarray select 1); //When mission should end in seconds.
publicVariable "END_TIME";







titleCut ["", "BLACK FADED", 999];

[] Spawn {

Expand All @@ -33,4 +99,73 @@ publicvariable "current_frequency";
"dynamicBlur" ppEffectCommit 5;

titleCut ["", "BLACK IN", 2];
};
};



if (isServer) then {
waitUntil {mission_start};

[] spawn
{
tickTime_ausgleich = diag_tickTime;
hint format ["Government is advancing.\nMission begins now. \nDuration is %1 mikes",END_TIME/60];
ELAPSED_TIME = 0;
START_TIME = diag_tickTime;
while {ELAPSED_TIME < END_TIME} do
{
ELAPSED_TIME = diag_tickTime - START_TIME - tickTime_ausgleich;
publicVariable "ELAPSED_TIME";
sleep 1;

};
};
};


if !(isDedicated) then
{waitUntil {mission_start};
[] spawn
{
tickTime_ausgleich = diag_tickTime;
hint format ["Government is advancing.\nMission begins now. \nDuration is %1 mikes",END_TIME/60];
ELAPSED_TIME = 0;
while{ELAPSED_TIME < END_TIME } do
{
_time = END_TIME - ELAPSED_TIME;
_finish_time_minutes = floor(_time / 60);
_finish_time_seconds = floor(_time) - (60 * _finish_time_minutes);

if (_time < 10) then {
nul=[] execVM "end\timeout.sqf";
};

if(_finish_time_seconds < 10) then
{
_finish_time_seconds = format ["0%1", _finish_time_seconds];
};
if(_finish_time_minutes < 10) then
{
_finish_time_minutes = format ["0%1", _finish_time_minutes];
};
_formatted_time = format ["%1:%2", _finish_time_minutes, _finish_time_seconds];


if (SHOW_TIME) then {
hintSilent format ["Time left:\n%1", _formatted_time];
};




if (_time == 180) then {
hintSilent format ["Time left:\n%1", _formatted_time];
}; // wenn nur noch 3min, ausgabe
if (_time < 60) then {
hintSilent format ["Time left:\n%1", _formatted_time];
}; // wenn nur noch 60s, ausgabe
sleep 1;

};
};
};
38 changes: 38 additions & 0 deletions SpoiledStashV3.Stratis/initJIPcompatible.sqf
@@ -0,0 +1,38 @@
_isJIP = if (time > 0) then { true } else { false };
waitUntil {!isNull player};
if ((mission_start) && (jip_disabled)) exitWith {hint "Mission already started, you cant join anymore. Sorry. You will be killed now."; player setDamage 1;};

if (side player == independent) then {
player setPos getMarkerPos "JIP_respawn_government";

removeAllWeapons player;
player addHeadgear 'H_HelmetIA_camo';
player addVest 'V_Rangemaster_belt';
player addUniform 'U_I_CombatUniform_tshirt';
player addMagazine ["30Rnd_556x45_Stanag", 3];
player addMagazine ["16Rnd_9x21_Mag", 3];
player addWeapon 'hgun_P07_F';
player addWeapon 'arifle_Mk20C_F';
player addPrimaryWeaponItem 'optic_Hamr';
player addPrimaryWeaponItem 'acc_flashlight';
player setFace 'WhiteHead_20';
hint "get yourself a radio at the box";

}
else
{
player setPos getMarkerPos "JIP_respawn_opfor";

removeAllWeapons player;
player addHeadgear 'H_Bandanna_mcamo';
player addVest 'V_Rangemaster_belt';
player addUniform 'U_BG_leader';
player addMagazine ["30Rnd_556x45_Stanag", 3];
player addMagazine ["16Rnd_9x21_Mag", 3];
player addWeapon 'hgun_P07_F';
player addWeapon 'arifle_Mk20C_F';
player addPrimaryWeaponItem 'optic_Hamr';
player addPrimaryWeaponItem 'acc_flashlight';
player setFace 'WhiteHead_20';
hint "get yourself a radio at the box";
};

0 comments on commit 53baf61

Please sign in to comment.