Skip to content

Commit

Permalink
loading pic, start hints, briefing, disableremotesensors
Browse files Browse the repository at this point in the history
- added pvp optimize command `disableremotesensors true`
- added new loading pic with logo
- added start hint system forcing players into map (though giving the a
3 second chance to opt out)
- added first part of briefing showing set parameter time
  • Loading branch information
nomisum committed Oct 2, 2015
1 parent d4d25d4 commit bc8970d
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 35 deletions.
3 changes: 2 additions & 1 deletion helpers/teleportPlayer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ _distance = _this select 1;

_spawn = [_location, 0, 50, 1, 0, 1, 0] call BIS_fnc_findSafePos;
playSound "beam";
cutText ["", "BLACK OUT", 1];
cutText ["", "BLACK OUT", 0.1];
sleep 1.2;
_nul = player setPos _spawn;
openMap [false, false];
hintSilent "";
cutText ["", "BLACK IN", 1];
14 changes: 9 additions & 5 deletions init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DEBUG_MODE = true;
call compile preprocessFile "islandConfig.sqf";
[] execVM "spawn\initGUI.sqf";

// read parameters
TIME_OF_DAY = paramsArray select 0;
WEATHER_SETTING = paramsArray select 1;
BLUFOR_SPAWN_DISTANCE = (paramsArray select 2) * 2;
Expand All @@ -18,14 +19,16 @@ AR3PLAY_ENABLE_REPLAY = (paramsArray select 7) == 1;
AR3PLAY_IS_STREAMABLE = (paramsArray select 8) == 1;
custom_overcast = 1;

// optimize for PVP
disableRemoteSensors true;

setCustomWeather = {
skipTime -24; 86400 setOvercast (_this select 0); skipTime 24;
};


switch (WEATHER_SETTING) do {
case 0: {[0] call setCustomWeather;};
case 1: {[0.5] call setCustomWeather;};
case 1: {[0.4] call setCustomWeather;};
case 2: {[1] call setCustomWeather;};
case 3: {[random 1] call setCustomWeather;};
default {[random 1] call setCustomWeather;};
Expand All @@ -36,6 +39,7 @@ if (!isMultiplayer) then { // Editor
{_x disableAI "MOVE"} forEach allUnits;
};

// set to full moon date
if (isServer) then {
setDate [2015, 2, 2, TIME_OF_DAY, 1];
setTimeMultiplier TIME_ACCELERATION;
Expand Down Expand Up @@ -118,7 +122,7 @@ if (hasInterface) then {
0 = [playerside] execVM "spawn\checkIfSpawned.sqf";
};

createSpawnButton = {
createStartHints = {
[] spawn checkSpawnButton;
};

Expand All @@ -142,15 +146,15 @@ if (hasInterface) then {
[] execVM "player\bluforOpforTeleportListener.sqf";
[] execVM "player\bluforBluforTeleportListener.sqf";
[] execVM "player\bluforRussianPointsListener.sqf";
//[] spawn createSpawnButton;
[] spawn createStartHints;

};

if (playerSide == east) then {
[] execVM "player\russianMarker.sqf"; diag_log format ["setup: russianmarker initiated"];
[] execVM "player\opforBluforTeleportListener.sqf"; diag_log format ["setup: opforBluforTeleportListener initiated"];
[] execVM "player\opforOpforTeleportListener.sqf"; diag_log format ["setup: opforOpforTeleportListener initiated"];
[] spawn createSpawnButton; diag_log format ["setup: createSpawnButton initiated"];
[] spawn createStartHints; diag_log format ["setup: createStartHints initiated"];


};
Expand Down
6 changes: 3 additions & 3 deletions mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class Mission
items=1;
class Item0
{
position[]={1404.3721,-0.25151056,6018.7788};
position[]={1478.9545,0.078979656,6015.1338};
class args
{
items=1;
Expand Down Expand Up @@ -1155,7 +1155,7 @@ class Mission
id=23;
side="EAST";
vehicle="O_officer_F";
player="PLAYER COMMANDER";
player="PLAY CDG";
rank="SERGEANT";
skill=0.5;
text="opfor_teamlead";
Expand Down Expand Up @@ -2157,7 +2157,7 @@ class Mission
id=82;
side="WEST";
vehicle="B_officer_F";
player="PLAY CDG";
player="PLAYER COMMANDER";
leader=1;
rank="MAJOR";
skill=0.5;
Expand Down
Binary file added pic/blufor_please_wait.paa
Binary file not shown.
Binary file modified pic/loading.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pic/opfor_please_wait.paa
Binary file not shown.
6 changes: 3 additions & 3 deletions player/bluforBluforTeleportListener.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ addBluforSpawnMarker = {
_pos = _this;


/*_blufor_marker_start = createMarkerLocal ["blufor_marker_start", _pos];
_blufor_marker_start = createMarkerLocal ["blufor_marker_start", _pos];
_blufor_marker_start setMarkerTypeLocal "hd_start";
_blufor_marker_start setMarkerColorLocal "ColorWEST";*/
_blufor_marker_start setMarkerColorLocal "ColorWEST";
};

deleteBluforSpawnLimitMarkers = {
Expand All @@ -16,7 +16,7 @@ _BLUFOR_TELEPORT_TARGET_listener = {
_pos = _this select 1;

_pos call addBluforSpawnMarker;
call deleteBluforSpawnLimitMarkers;
// call deleteBluforSpawnLimitMarkers;

[_pos, 50] execVM "helpers\teleportPlayer.sqf";
};
Expand Down
3 changes: 2 additions & 1 deletion player/setup/helpBriefing.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Create Diary Record - HINWEISE -
player createDiaryRecord ["Diary", ["Mission",localize "str_GRAD_briefing"]];
_minutes = str (POINTS_NEEDED_FOR_VICTORY/60);
player createDiaryRecord ["Diary", ["Mission",localize "str_GRAD_briefing" + " " + _minutes + " min."]];

player createDiaryRecord ["Diary", ["Story",localize "str_GRAD_story"]];
7 changes: 5 additions & 2 deletions server/teleportListener.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ createOpforStuff = {
_opfor_marker_start = createMarker ["debug_opfor_marker_start", RUS_VEHICLE_SPAWN];
_opfor_marker_start setMarkerType "hd_start";
_opfor_marker_start setMarkerColor "ColorOpfor";
} else {

};

};
Expand All @@ -42,9 +44,10 @@ createBluforStuff = {
_bluforposition = [_opforposition, "US_WarfareBUAVterminal_Base_EP1"] call findBluforPos;

BLUFOR_TELEPORT_TARGET = _bluforposition;
publicVariable "BLUFOR_TELEPORT_TARGET";
publicVariableServer "OPFOR_TELEPORT_TARGET";
debugLog("blufor published target");

diag_log format ["creating blufor stuff on position: %1",_bluforposition];
// diag_log format ["creating blufor stuff on position: %1",_bluforposition];


US_base = [_bluforposition, 0, 5, "US_WarfareBUAVterminal_Base_EP1"] call spawnStuff;
Expand Down
28 changes: 15 additions & 13 deletions spawn/checkIfSpawned.sqf
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
if (!OPFOR_TELEPORTED && (_this select 0 == east)) exitWith {
if (player == opfor_teamlead) then {
titleCut ["Mission Setup", "BLACK", 999];
0 = createDialog "gui_spawn_opfor";
waitUntil {dialog};
titleCut ["Mission Setup", "BLACK", 999];
[] call checkSpawnButton;
} else {
titleCut ["Mission Setup", "BLACK", 999];
0 = createDialog "gui_spawn_waitplease";
titleCut ["Mission Setup", "BLACK", 999];
waitUntil {BLUFOR_TELEPORTED};
cutText ["", "BLACK IN", 1];
openMap [true,false];
cutRsc ["gui_opfor_pleasewait","PLAIN",0];
waitUntil {!visibleMap};
if (OPFOR_TELEPORT_TARGET select 0 != 0) exitWith {};
hintsilent "Please dont move. Showing map...";
sleep 3;
if (BLUFOR_TELEPORT_TARGET select 0 != 0) exitWith {};
[] call checkSpawnButton;
};
};

if (!BLUFOR_TELEPORTED && (_this select 0 == west)) exitWith {
titleCut ["Mission Setup", "BLACK", 999];
0 = createDialog "gui_spawn_waitplease";
waitUntil {dialog};
if (BLUFOR_TELEPORTED) exitWith {cutText ["", "BLACK IN", 1];};
titleCut ["Mission Setup", "BLACK", 999];
openMap [true,false];
cutRsc ["gui_blufor_pleasewait","PLAIN",0];
waitUntil {!visibleMap};
if (BLUFOR_TELEPORT_TARGET select 0 != 0) exitWith {};
hintsilent "Please dont move. Showing map...";
sleep 3;
if (BLUFOR_TELEPORT_TARGET select 0 != 0) exitWith {};
[] call checkSpawnButton;
};
40 changes: 39 additions & 1 deletion spawn/gui/_dialogs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ class RscTitles {
fadeOut = 5;

class controls {
class russian_gui_pic_1: RscPicture
class gui_intel_paper_pic: RscPicture
{
idc = -1;
x = safeZoneX + safeZoneW - 0.3;
Expand All @@ -1078,4 +1078,42 @@ class RscTitles {
};
};
};
class gui_blufor_pleasewait
{
idd = -1;
duration = 10e10;
name = "gui_blufor_pleasewait";
fadeIn = 1;

class controls {
class gui_blufor_pleasewait_pic: RscPicture
{
idc = -1;
x = 10 * GUI_GRID_W + GUI_GRID_X;
y = 10 * GUI_GRID_H + GUI_GRID_Y;
w = 16 * GUI_GRID_W;
h = 8 * GUI_GRID_H;
text = "pic\blufor_please_wait.paa";
};
};
};
class gui_opfor_pleasewait
{
idd = -1;
duration = 10e10;
name = "gui_opfor_pleasewait";
fadeIn = 1;

class controls {
class gui_opfor_pleasewait_pic: RscPicture
{
idc = -1;
x = 10 * GUI_GRID_W + GUI_GRID_X;
y = 10 * GUI_GRID_H + GUI_GRID_Y;
w = 18 * GUI_GRID_W;
h = 8 * GUI_GRID_H;
text = "pic\opfor_please_wait.paa";
};
};
};
};
12 changes: 6 additions & 6 deletions stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<Package name="TvT_Sputnik_package">
<Container name="mission briefing">
<Key ID="str_GRAD_story">
<Original>tbd story</Original>
<English>tbd story</English>
<German>tbd story</German>
<Original>You want to know the full story? Check back later</Original>
<English>You want to know the full story? Check back later</English>
<German>Du willst die ganze Wahrheit wissen? Schau später nochmal rein.</German>
</Key>
<Key ID="str_GRAD_briefing">
<Original>tbd story</Original>
<English>tbd story</English>
<German>tbd story</German>
<Original>US has to find and destroy the Russian radio truck before it ends it transmission. Russians have to protect their truck for </Original>
<English>US has to find and destroy the Russian radio truck before it ends it transmission. Russians have to protect their truck for </English>
<German>Die Amerikaner müssen den Funkwagen der Russen finden und zerstören, bevor er seine Übertragung abschließen kann. Die Russen müssen ihn davor bewahren. Eingestellte Dauer: </German>
</Key>
</Container>
<Container name="mission setup">
Expand Down

0 comments on commit bc8970d

Please sign in to comment.