Compare commits

..

18 Commits
3den ... main

Author SHA1 Message Date
buster 97767af543 briefing and some flavour
added a briefing, it will probably need some editing. also mixed some republican guard in with the nacs regulars for flabour
2024-02-27 00:30:48 +11:00
buster c607710a10 updated name and date
tag brought up bowie so now thats gonna be the name of these missions
2024-02-26 21:52:32 +11:00
Taggerung 6e54fd3dd6 Respawn Marker 2024-02-23 18:51:36 +10:30
buster 11fd5c8f7f Update mission.sqm 2024-02-23 17:06:10 +11:00
taggerung 11786d5fdd Merge pull request 'Respawn delay' (#4) from ViewDistance&ShiftClick into main
Reviewed-on: #4
2024-02-22 07:11:53 +00:00
Taggerung 881b8584fa Respawn delay
Added a 5s delay to respawn.
This allows the loadout saving to work.
2024-02-22 17:41:28 +10:30
buster 9aad2d4404 Merge pull request 'View Distance and Shift Click' (#3) from ViewDistance&ShiftClick into main
Reviewed-on: #3
2024-02-22 06:50:22 +00:00
Taggerung fb9a192b17 View Distance and Shift Click
Adds view distance options on ace self interact.
Replaces Shift click map/3d marker with a point w/o distance --adjustable in Parameters.
Should merge fine into main, doesn't change any files at time of commit
2024-02-22 17:08:01 +10:30
buster 137c7691e8 dlc proofing
added some vanilla uniforms in case people get annoyed
2024-02-21 13:00:27 +11:00
buster be7013e324 finishing touches
Added some light houses, a fire to guide in boats. removed weapons from ranges and add mortar ammo
2024-02-20 22:57:26 +11:00
buster 1329ce75f6 Update briefing.sqf
spelling fixes
2024-02-20 21:41:51 +11:00
buster 047512b55b Update mission.sqm 2024-02-20 21:03:56 +11:00
buster d842f88003 Merge pull request 'Teleport Boats' (#2) from teleportBoats into main
Reviewed-on: #2
2024-02-20 09:36:34 +00:00
Taggerung d1ce532388 Teleport Boats
Addaction on alpha boatk
2024-02-20 20:05:42 +10:30
buster d749fdd53e pushing fix
addressing issues in briefing
2024-02-20 20:17:07 +11:00
buster fd84aea9fb fixing folder name
and some spacing in the brief
2024-02-20 18:56:47 +11:00
buster 2b09c33a58 adjustments
adjusting time and added another stick just in case. moved respawn to intitial spawn. Added briefing probably some other stuff.
2024-02-20 18:39:01 +11:00
buster cdb83bbc00 mostly finished mission
Added patrols and better unit positions. Added 3den.
Need the boat teleport. Must add objectives manually through zeus
2024-02-20 16:47:31 +11:00
20 changed files with 11399 additions and 4013 deletions

View File

@ -140,6 +140,15 @@ a:hover {
<a href="http://steamcommunity.com/sharedfiles/filedetails/?id=463939057" data-type="Link">http://steamcommunity.com/sharedfiles/filedetails/?id=463939057</a> <a href="http://steamcommunity.com/sharedfiles/filedetails/?id=463939057" data-type="Link">http://steamcommunity.com/sharedfiles/filedetails/?id=463939057</a>
</td> </td>
</tr> </tr>
<tr data-type="ModContainer">
<td data-type="DisplayName">3den Enhanced</td>
<td>
<span class="from-steam">Steam</span>
</td>
<td>
<a href="https://steamcommunity.com/sharedfiles/filedetails/?id=623475643" data-type="Link">https://steamcommunity.com/sharedfiles/filedetails/?id=623475643</a>
</td>
</tr>
</table> </table>
</div> </div>
<div class="dlc-list"> <div class="dlc-list">

View File

@ -0,0 +1,14 @@
PN_C_CIV_Doctor
PN_C_CIV_Worker_4
PN_C_CIV_Man_Casual_2_Tie
PN_C_CIV_Man_Casual_4_Tie
PN_C_CIV_Worker_2
PN_C_CIV_Man_Casual_5_Rolled
PN_C_CIV_Man_Casual_6_Rolled
PN_C_CIV_Man_Formal_Grey
PN_C_CIV_Man_Casual_7_Tie
PN_C_CIV_Man_Casual_3_Rolled
PN_C_CIV_Man_Vest_4
PN_C_CIV_Man_Sweater_5
PN_C_CIV_Man_Jacket
PN_C_CIV_Man_Formal

100
briefing.sqf Normal file
View File

@ -0,0 +1,100 @@
waitUntil {!(isNull player)};
waitUntil {player==player};
switch (side player) do
{
case EAST:
{
};
case WEST:
{
};
case RESISTANCE:
{
player createDiaryRecord ["Diary", ["Logistics","
Resupply: After the airfield is captured a helicopter can fly in more amunition at the request of Sunray.
<br/>
<br/>
Fire Support: the Sehrenist Forces have promised to supply a mortar tube, other then that you are on your own.
<br/>
<br/>
Radios: team leads and sunray will be supplied with pack radios.
"]];
player createDiaryRecord ["Diary",["R.O.E. ","
Sehrenist Forces: Allies in this fight, do not engage.
<br/>
<br/>
NACS and Guardia: Hostile, engage at your team leaders discretion. Free to return fire at will.
<br/>
<br/>
Civilians: likely to be present in Paraiso, avoid if possible. not mission critical.
"]];
player createDiaryRecord ["Diary",["Execution","
While the Mercenaries are attacking the airfield the Sehrinst will fight a blocking action to the south against any NACS reinforcements.
It is likely they will not be able to stop any attack, only hold it for some time. They will keep us aprised via radio.
Be prepared to fight a defense action after the General has been removed, the airfield is vital to our plans, we cannot lose it.
"]];
player createDiaryRecord ["Diary",["Forces","
British Mercenaries (Hatchett team):
<br/> Rouglhy platoon sized force of 'ex' special forces.
<br/>
<br/>
Sehrenist:
<br/> loacl Guirella movement, irregular force with a mix of weapons. Our Allies for this mission.
Identified by the bands on thier left arm.
<br/>
<br/>
The National Army Corps of Sahrani (NACS):
<br/> Easily identifiable by their uniforms, the millitary arm of the Dictorship and our opposition for today.
Years of political isolation from the west has lead to the NACS having to rely on WW2 era gear along with a limited amount of more modern equipment secured from South American and African nations.
Shermans still make up the majority of the NACS armoured might.
<br/>
<br/>
Guardia Civil de Sahrani:
<br/> the Police, lightly armed but loyal to the General. Identified by their yellow berets
Currently Riot units are guarding several checkpoints leading into Paraiso.
"]];
player createDiaryRecord ["Diary",["Mission","
Before sunrise our forces will effect a landing at Rashidan and meet up with Sehrenist forces to acquire vehicles and heavy weapons.
<br/>
<br/>
From there we will attack and seize the Airfield.
<br/>
<br/>
Once this is accomplished they will move on to capturing the General himself from his mansion in Corinto.
<br/>
<br/>
The General will then be escorted to the Airfield to be flown away and formerly be offered Asylum.
"]];
player createDiaryRecord ["Diary",["Situation","
The former British Colony of Sahrani is in the middle of a bloody Civil war.
The rebellious socialist Democratic Republic of Sahrani in the north is at war with dictator General Leopoldo Vejar in the south.
The General has failed to put down the socialists and so the time has come for a reigme change.
<br/>
<br/>
The royalist faction, the Sehrenists, has been fighting a gueralla war against both the General and the Communists.
A force of British 'Mercenaries' will be sent to remove the general and reinstate King Joseph III to the throne.
He has been trained at Sandhurst and will be more amenable to our needs.
"]];
};
case CIVILIAN:
{
};
};

17
description.ext Normal file
View File

@ -0,0 +1,17 @@
#include "taw_vd\GUI.h"
class CfgFunctions
{
#include "taw_vd\CfgFunctions.hpp"
};
class Params
{
class Param_Waypoints
{
title="Waypoints";
values[]={0,1,2};
texts[]={"On", "No Distance", "Off"};
default = 1;
};
};

22
init.sqf Normal file
View File

@ -0,0 +1,22 @@
null = execVM "briefing.sqf";
busterTele = {
if (driver vehicle player isEqualTo player) then {
if ((vehicle player)==LCA_Alpha) then {
LCA_Alpha setDir 90;
LCA_Alpha setPos [8259.05,11675.7,5];
LCA_Bravo setDir 90;
LCA_Bravo setPos [8249.38,11702,5];
LCA_Charlie setDir 90;
LCA_Charlie setPos [8242.38,11655.3,5];
LCA_Delta setDir 90;
LCA_Delta setPos [8227.13,11718.6,5];
LCA_Echo setDir 90;
LCA_Echo setPos [8222.25,11638.6,5];
};
};
};

42
initPlayerLocal.sqf Normal file
View File

@ -0,0 +1,42 @@
//saves player loadout for respawn
[player, [missionnamespace, "virtualinventory"]] call Bis_fnc_saveinventory;
//makes shift click markers on map become plain dots without distance.
//note: difficulty must be set accordingly
if (paramsArray select 0 == 2) then {
player onMapSingleClick {_shift};
};
if (paramsArray select 0 == 1) then {
disableSerialization;
if (hasInterface) then { waitUntil {!isNull (findDisplay 12)};
_mapDisplay = findDisplay 12;
_mapControl = _mapDisplay displayCtrl 51;
_mapControl ctrlAddEventHandler ["MouseMoving", {
TRN_var_mainMapMouseOverCustomMark = "customMark" in (ctrlMapMouseOver (_this select 0));
}];
["TRN", "onMapSingleClick", {
if (_shift) then {
TRN_var_customMarkLocation = _pos;
};
}] call BIS_fnc_addStackedEventHandler;
_mapDisplay displayAddEventHandler ["KeyDown", {
if (!isNil "TRN_var_mainMapMouseOverCustomMark" && {TRN_var_mainMapMouseOverCustomMark} && {(_this select 1) == 211}) then {
TRN_var_customMarkLocation = nil;
};
}];
addMissionEventHandler ["Draw3D", {
if (!isNil "TRN_var_customMarkLocation") then {
drawIcon3D ["\A3\ui_f\data\igui\cfg\cursors\customMark_ca.paa", [1,1,1,0.3], [TRN_var_customMarkLocation select 0, TRN_var_customMarkLocation select 1, (TRN_var_customMarkLocation select 2) + 2], 1.5, 1.5, 0, "", 1, 0, "TahomaB", "", true];
};
}];
};
};
//disables subtitles and spoken sentences "Enemy. inftantry. west. 400" etc
showSubtitles false;
enableSentences false;

14027
mission.sqm

File diff suppressed because it is too large Load Diff

21
taw_vd/CfgFunctions.hpp Normal file
View File

@ -0,0 +1,21 @@
class TAW_VD {
tag = "TAWVD";
class Initialize {
file = "taw_vd";
class stateTracker {
ext = ".fsm";
postInit = 1;
headerType = -1;
};
class onSliderChanged {};
class onTerrainChanged {};
class updateViewDistance {};
class openMenu {};
class onChar {};
class openSaveManager {};
class onSavePressed {};
class onSaveSelectionChanged {};
};
};

668
taw_vd/GUI.h Normal file
View File

@ -0,0 +1,668 @@
#include "defines.h"
class RscEdit {
type = 2;
style = 0x00 + 0x40;
font = "PuristaMedium";
shadow = 2;
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorBackground[] = {0, 0, 0, 1};
soundSelect[] = {"",0.1,1};
soundExpand[] = {"",0.1,1};
colorText[] = {0.95, 0.95, 0.95, 1};
colorDisabled[] = {1, 1, 1, 0.25};
autocomplete = false;
colorSelection[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1};
canModify = 1;
};
class RscListBox {
style = 16;
idc = -1;
type = 5;
w = 0.275;
h = 0.04;
font = "PuristaMedium";
colorSelect[] = {1, 1, 1, 1};
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0.28,0.28,0.28,0.28};
colorSelect2[] = {1, 1, 1, 1};
colorSelectBackground[] = {0.95, 0.95, 0.95, 0.5};
colorSelectBackground2[] = {1, 1, 1, 0.5};
colorScrollbar[] = {0.2, 0.2, 0.2, 1};
colorPicture[] = {1,1,1,1};
colorPictureSelected[] = {1,1,1,1};
colorPictureDisabled[] = {1,1,1,1};
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
wholeHeight = 0.45;
rowHeight = 0.04;
color[] = {0.7, 0.7, 0.7, 1};
colorActive[] = {0,0,0,1};
colorDisabled[] = {0,0,0,0.3};
sizeEx = 0.023;
soundSelect[] = {"",0.1,1};
soundExpand[] = {"",0.1,1};
soundCollapse[] = {"",0.1,1};
maxHistoryDelay = 1;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
class ListScrollBar {
color[] = {1,1,1,1};
colorActive[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.3};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
shadow = 0;
scrollSpeed = 0.06;
width = 0;
height = 0;
autoScrollEnabled = 1;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
}
};
class RscCheckBox {
access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified)
idc = -1; // Control identification (without it, the control won't be displayed)
type = 77; // Type
style = ST_LEFT + ST_MULTI; // Style
default = 0; // Control selected by default (only one within a display can be used)
blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect.
x = 0;
y = 0;
w = 1 * GUI_GRID_CENTER_W; // Width
h = 1 * GUI_GRID_CENTER_H; // Height
//Colors
color[] = { 1, 1, 1, 0.7 }; // Texture color
colorFocused[] = { 1, 1, 1, 1 }; // Focused texture color
colorHover[] = { 1, 1, 1, 1 }; // Mouse over texture color
colorPressed[] = { 1, 1, 1, 1 }; // Mouse pressed texture color
colorDisabled[] = { 1, 1, 1, 0.2 }; // Disabled texture color
//Background colors
colorBackground[] = { 0, 0, 0, 0 }; // Fill color
colorBackgroundFocused[] = { 0, 0, 0, 0 }; // Focused fill color
colorBackgroundHover[] = { 0, 0, 0, 0 }; // Mouse hover fill color
colorBackgroundPressed[] = { 0, 0, 0, 0 }; // Mouse pressed fill color
colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // Disabled fill color
//Textures
textureChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; //Texture of checked CheckBox.
textureUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; //Texture of unchecked CheckBox.
textureFocusedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; //Texture of checked focused CheckBox (Could be used for showing different texture when focused).
textureFocusedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; //Texture of unchecked focused CheckBox.
textureHoverChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
textureHoverUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
texturePressedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
texturePressedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
textureDisabledChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
textureDisabledUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
tooltip = ""; // Tooltip text
tooltipColorShade[] = { 0, 0, 0, 1 }; // Tooltip background color
tooltipColorText[] = { 1, 1, 1, 1 }; // Tooltip text color
tooltipColorBox[] = { 1, 1, 1, 1 }; // Tooltip frame color
//Sounds
soundClick[] = { "\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1 }; // Sound played after control is activated in format {file, volume, pitch}
soundEnter[] = { "\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1 }; // Sound played when mouse cursor enters the control
soundPush[] = { "\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1 }; // Sound played when the control is pushed down
soundEscape[] = { "\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1 }; // Sound played when the control is released after pushing down
};
class RscXSliderH {
style = 1024;
type = 43;
shadow = 2;
x = 0;
y = 0;
h = 0.029412;
w = 0.400000;
color[] = {
1, 1, 1, 0.7
};
colorActive[] = {
1, 1, 1, 1
};
colorDisabled[] = {
1, 1, 1, 0.500000
};
arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa";
thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa";
};
class RscText {
x = 0;
y = 0;
h = 0.037;
w = 0.3;
type = 0;
style = 0;
shadow = 1;
colorShadow[] = {0, 0, 0, 0.5};
font = "PuristaMedium";
SizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
text = "";
colorText[] = {1, 1, 1, 1.0};
colorBackground[] = {0, 0, 0, 0};
linespacing = 1;
};
class RscTitle:RscText {
style = 0;
shadow = 0;
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.95, 0.95, 0.95, 1};
};
class RscShortcutButton {
idc = -1;
style = 0;
default = 0;
shadow = 1;
w = 0.183825;
h = "( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20)";
color[] = {1,1,1,1.0};
colorFocused[] = {1,1,1,1.0};
color2[] = {0.95,0.95,0.95,1};
colorDisabled[] = {1,1,1,0.25};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};
colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};
colorBackground2[] = {1,1,1,1};
animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";
animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa";
animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa";
animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa";
periodFocus = 1.2;
periodOver = 0.8;
class HitZone
{
left = 0.0;
top = 0.0;
right = 0.0;
bottom = 0.0;
};
class ShortcutPos
{
left = 0;
top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
w = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";
h = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
};
class TextPos
{
left = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";
top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
right = 0.005;
bottom = 0.0;
};
period = 0.4;
font = "PuristaMedium";
size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
text = "";
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1};
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
action = "";
class Attributes
{
font = "PuristaMedium";
color = "#E5E5E5";
align = "left";
shadow = "true";
};
class AttributesImage
{
font = "PuristaMedium";
color = "#E5E5E5";
align = "left";
};
};
class RscControlsGroup {
type = 15;
idc = -1;
x = 0;
y = 0;
w = 1;
h = 1;
shadow = 0;
style = 16;
class ScrollBar {
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
shadow = 0;
scrollSpeed = 0.05;
};
class VScrollbar:ScrollBar {
width = 0.021;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
shadow = 0;
color[] = {1, 1, 1, 0.6};
};
class HScrollbar:ScrollBar {
height = 0.028;
shadow = 0;
color[] = {1, 1, 1, 0.6};
};
//class ListScrollBar : ScrollBar {};
class Controls {};
};
class RscControlsGroupNoScrollbars : RscControlsGroup {
class VScrollbar : VScrollbar {
width = 0;
};
class HScrollbar : HScrollbar {
height = 0;
};
};
class RscButtonMenu:RscShortcutButton {
idc = -1;
type = 16;
style = "0x02 + 0xC0";
default = 0;
shadow = 0;
x = 0;
y = 0;
w = 0.095589;
h = 0.039216;
animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
colorBackground[] = {0,0,0,0.8};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground2[] = {0.75,0.75,0.75,1};
color[] = {1,1,1,1};
colorFocused[] = {0,0,0,1};
color2[] = {0,0,0,1};
colorText[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.25};
period = 1.2;
periodFocus = 1.2;
periodOver = 1.2;
size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
class TextPos
{
left = "0.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
right = 0.005;
bottom = 0.0;
};
class Attributes
{
font = "PuristaLight";
color = "#E5E5E5";
align = "left";
shadow = "false";
};
class ShortcutPos
{
left = "(6.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005";
top = 0.005;
w = 0.0225;
h = 0.03;
};
soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1};
soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1};
textureNoShortcut = "";
};
class TAW_VDMenu {
idd = MENU_IDD;
name = "TAW_VDMenu";
movingEnabled = 0;
enableSimulation = 1;
onLoad = "((_this select 0) displayCtrl 2999) ctrlSetFade 1; ((_this select 0) displayCtrl 2999) ctrlCommit 0;";
class controlsBackground {
class TitleBackground : RscText {
colorBackground[] = { "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])" };
idc = -1;
x = .3;
y = .2;
w = .5;
h = (1 / 25);
};
class MainBackground : RscText {
colorBackground[] = { 0, 0, 0, .7 };
idc = -1;
x = .3;
y = .2 + (11 / 250);
w = .5;
h = .57 - (22 / 250);
};
class Title : RscTitle {
colorBackround[] = { 0, 0, 0, 0 };
idc = -1;
text = "View Settings (SCRIPT)";
x = .3;
y = .2;
w = .8;
h = (1 / 25);
};
class OnFootText : RscText {
idc = -1;
text = "Infantry:";
x = .32;
y = .258;
w = .275;
h = .04;
};
class inCarText : OnFootText {
text = "Ground:";
y = .305;
};
class inAirText : OnFootText {
text = "Air:";
y = .355;
};
class ObjectText : OnFootText {
text = "Object:";
y = .655;
};
class DroneText : OnFootText {
text = "Drone:";
y = .405;
};
class TerrainBackground : TitleBackground {
text = "Grass Settings";
shadow = 0;
y = .46;
};
class ObjectBackground : TitleBackground {
text = "Object Settings";
y = .55;
};
class ButtonClose : RscButtonMenu {
idc = -1;
text = "Close";
onButtonClick = "closeDialog 0;";
x = 0.3;
y = 0.77 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
class SaveManagerBtn:ButtonClose {
text = "Saves";
onButtonClick = "[] call tawvd_fnc_openSaveManager;";
x = .465;
};
};
class controls {
//Sliders
class VD_onFoot_slider : RscXSliderH {
idc = INFANTRY_SLIDER;
text = "";
onSliderPosChanged = "[0, _this select 1] call TAWVD_fnc_onSliderChanged;";
toolTip = "View Distance while on foot";
x = .42;
y = .30 - (1 / 25);
w = "9 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class VD_inCar_slider : VD_onFoot_slider {
idc = GROUND_SLIDER;
toolTip = "View distance while in a ground vehicle";
onSliderPosChanged = "[1, _this select 1] call TAWVD_fnc_onSliderChanged;";
y = .35 - (1 / 25);
};
class VD_inAir_slider : VD_onFoot_slider {
idc = AIR_SLIDER;
toolTip = "View distance while in an aircraft";
onSliderPosChanged = "[2, _this select 1] call TAWVD_fnc_onSliderChanged;";
y = .40 - (1 / 25);
};
class VD_Object_slider : VD_onFoot_slider {
idc = OBJECT_SLIDER;
toolTip = "Object rendering distance";
onSliderPosChanged = "[3, _this select 1] call TAWVD_fnc_onSliderChanged;";
y = .7 - (1 / 25);
};
class VD_Drone_slider:VD_onFoot_slider {
idc = DRONE_SLIDER;
toolTip = "View distance while operating a UAV/UGV";
onSliderPosChanged = "[4, _this select 1] call TAWVD_fnc_onSliderChanged;";
y = .45 - (1 / 25);
}
//Values (RscEdit Butons)
class VD_onFoot_Edit : RscEdit {
idc = INFANTRY_EDIT;
text = "";
onKeyUp = "[_this select 0, _this select 1, 'ground',true] call TAWVD_fnc_onChar;";
x = .7;
y = .258;
w = .08;
h = .04;
};
class VD_inCar_Edit : VD_onFoot_Edit {
idc = GROUND_EDIT;
onKeyUp = "[_this select 0, _this select 1, 'vehicle',true] call TAWVD_fnc_onChar;";
y = .31;
};
class VD_inAir_Edit : VD_onFoot_Edit {
idc = AIR_EDIT;
onKeyUp = "[_this select 0, _this select 1, 'air',true] call TAWVD_fnc_onChar;";
y = .36;
};
class VD_inDrone_Edit:VD_onFoot_Edit {
idc = DRONE_EDIT;
onKeyUp = "[_this select 0, _this select 1, 'drone',true] call TAWVD_fnc_onChar;";
y = .41;
};
class VD_Object_Edit : VD_onFoot_Edit {
idc = OBJECT_EDIT;
onKeyUp = "[_this select 0, _this select 1, 'object',true] call TAWVD_fnc_onChar;";
y = .656;
};
//Grass Settings
class VD_terrain_none {
idc = TERRAIN_NONE;
type = 11;
style = 0;
font = "PuristaLight";
color[] = { 1, 1, 1, 1 };
colorActive[] = { 1, 0.2, 0.2, 1 };
colorDisabled[] = {0, 0, 0, 1};
soundEnter[] = { "\A3\ui_f\data\sound\onover", 0.09, 1 };
soundPush[] = { "\A3\ui_f\data\sound\new1", 0.0, 0 };
soundClick[] = { "\A3\ui_f\data\sound\onclick", 0.07, 1 };
soundEscape[] = { "\A3\ui_f\data\sound\onescape", 0.09, 1 };
text = "None";
action = "['none'] call TAWVD_fnc_onTerrainChanged;";
sizeEx = 0.04;
x = .38; y = .505;
w = .275; h = .04;
};
class VD_terrain_low : VD_terrain_none {
idc = -1;
text = "Low";
action = "['low'] call TAWVD_fnc_onTerrainChanged;";
x = .47;
};
class VD_terrain_normal : VD_terrain_none {
idc = -1;
text = "Normal";
action = "['norm'] call TAWVD_fnc_onTerrainChanged;";
x = .56;
};
class VD_terrain_high : VD_terrain_none {
idc = -1;
text = "High";
action = "['high'] call TAWVD_fnc_onTerrainChanged;";
x = .67;
};
class ObjectSyncCheckbox : RscCheckbox
{
idc = 2931;
x = .32; y = .6;
tooltip = "Sync object rendering with view rendering";
onCheckedChanged = "if((_this select 1) == 1) then {tawvd_syncObject = true;ctrlEnable [2941,false]; ctrlEnable [2942,false];} else {tawvd_syncObject = false; ctrlEnable [2942,true]; ctrlEnable [2941,true];};";
w = 1 * GUI_GRID_CENTER_W;
h = 1 * GUI_GRID_CENTER_H;
};
class ObjectSynctext : RscText {
idc = -1;
text = "Sync with view";
x = .345; y = .596;
w = .35; h = .04;
};
class Manager:RscControlsGroup {
idc = MANAGER_GROUP;
x = -0.21; y = .2;
w = .5; h = 3;
class Controls {
class SaveLoadGroup:RscControlsGroupNoScrollbars {
idc = SAVELOAD_GROUP;
x = 0;
y = 0;
w = .5;
h = 3;
class Controls {
class MyTitleBackground:RscText {
colorBackground[] = { "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])" };
idc = -1;
x = 0;
y = 0;
w = .5;
h = (1 / 25);
};
class Title : RscTitle {
colorBackround[] = { 0, 0, 0, 0 };
idc = -1;
text = "Save Manager";
x = 0;
y = 0;
w = .8;
h = (1 / 25);
};
class MainBackground:RscText {
colorBackground[] = { 0, 0, 0, .7 };
idc = -1;
x = 0;
y = 0 + (11 / 250);
w = .5;
h = .57 - (22 / 250);
};
class SaveList:RscListBox {
idc = SAVES_LIST;
sizeEx = 0.04;
colorBackground[] = {0.1,0.1,0.1,0.9};
x = 0; y = 0 + (11 / 250);
w = .5; h = .49 - (22 / 250);
onLBSelChanged = "_this call TAWVD_fnc_onSaveSelectionChanged;";
};
class SaveSlotName:VD_onFoot_Edit {
idc = SLOT_NAME;
text = "SAVE NAME";
colorBackground[] = {0,0,0,0.6};
onKeyUp = "";
x = .025; y = .42 + (11 / 250);
w = .45;
};
class SaveButton:RscButtonMenu {
text = "Save";
onButtonClick = "[] call TAWVD_fnc_onSavePressed;";
x = 0;
y = 0.57 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
class HideButton:RscButtonMenu {
text = "Hide";
onButtonClick = "((findDisplay 2900) displayCtrl 2999) ctrlSetFade 1; ((findDisplay 2900) displayCtrl 2999) ctrlCommit 0.3;";
x = .16;
y = 0.57 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
};
};
};
};
};
};

44
taw_vd/defines.h Normal file
View File

@ -0,0 +1,44 @@
/* Main display IDD & IDC's */
#define MENU_IDD 2900
#define INFANTRY_SLIDER 2901
#define INFANTRY_EDIT 2902
#define GROUND_SLIDER 2911
#define GROUND_EDIT 2912
#define AIR_SLIDER 2921
#define AIR_EDIT 2922
#define OBJECT_SLIDER 2941
#define OBJECT_EDIT 2942
#define DRONE_SLIDER 2951
#define DRONE_EDIT 2952
#define TERRAIN_NONE 2950
#define GUI_GRID_CENTER_WAbs ((safezoneW / safezoneH) min 1.2)
#define GUI_GRID_CENTER_HAbs (GUI_GRID_CENTER_WAbs / 1.2)
#define GUI_GRID_CENTER_W (GUI_GRID_CENTER_WAbs / 40)
#define GUI_GRID_CENTER_H (GUI_GRID_CENTER_HAbs / 25)
#define GUI_GRID_CENTER_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2)
#define GUI_GRID_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_CENTER_HAbs)/2)
#define ST_LEFT 0x00
#define ST_MULTI 0x10
#define SEL(ARRAY,INDEX) (ARRAY select INDEX)
/* Save / Load Manager */
#define MANAGER_GROUP 2999
#define SAVELOAD_GROUP 3000
#define SAVES_LIST 3001
#define SLOT_NAME 3002
/* Namespace Macros */
#define SVAR_MNS missionNamespace setVariable
#define SVAR_UINS uiNamespace setVariable
#define SVAR_PNS profileNamespace setVariable
#define GVAR_MNS missionNamespace getVariable
#define GVAR_UINS uiNamespace getVariable
#define GVAR_PNS profileNamespace getVariable
/* Condition Macros */
#define EQUAL(condition1,condition2) condition1 isEqualTo condition2
/* Display Macros */
#define CONTROL(disp,ctrl) ((findDisplay ##disp) displayCtrl ##ctrl)
#define CONTROL_DATA(ctrl) (lbData[ctrl,lbCurSel ctrl])
#define CONTROL_DATAI(ctrl,index) ctrl lbData index

36
taw_vd/fn_onChar.sqf Normal file
View File

@ -0,0 +1,36 @@
#include "defines.h"
/*
Author: Bryan "Tonic" Boardwine
Description:
When a character is entered it is validated and changes the
correct slider it is associated with. I probably over-complicated
this more then I had to but onChar behaves weird.
PARAMS:
0: CONTROL
1: SCALAR (INT)
2: STRING (Case option)
*/
private["_value","_varName","_maxRange"];
params ["_control","_code","_slider"];
disableSerialization;
if(isNull _control) exitWith {}; //POOOOOP
_maxRange = if(!isNil "tawvd_maxRange") then {tawvd_maxRange} else {20000};
_value = parseNumber (ctrlText _control);
if(_value > _maxRange OR _value < 100) exitwith {[] call TAWVD_fnc_openMenu;};
_varName = switch (_slider) do {
case "ground": {"tawvd_foot"};
case "vehicle": {"tawvd_car"};
case "air": {"tawvd_air"};
case "object": {"tawvd_object"};
case "drone": {"tawvd_drone"};
default {"tawvd_foot"};
};
SVAR_MNS [_varName,_value];
[] call TAWVD_fnc_updateViewDistance;
[] call TAWVD_fnc_openMenu;

View File

@ -0,0 +1,27 @@
#include "defines.h"
/*
Author: Bryan "Tonic" Boardwine
Description:
Updates the view distance dependant on whether the player
is on foot, a car or an aircraft.
*/
private ["_saveIndex","_saveName"];
_saveIndex = lbCurSel SAVES_LIST;
_saveName = ctrlText SLOT_NAME;
hint format["saveIndex: %1", _saveIndex];
SVAR_PNS [format["tawvd_slot_%1",_saveIndex],
[
_saveName,
tawvd_foot,
tawvd_car,
tawvd_air,
tawvd_drone,
tawvd_object,
tawvd_syncObject
]
];
saveProfileNamespace;
[] call TAWVD_fnc_openSaveManager;

View File

@ -0,0 +1,28 @@
#include "defines.h"
/*
Author: Bryan "Tonic" Boardwine
Description:
Updates the view distance dependant on whether the player
is on foot, a car or an aircraft.
*/
private "_saveData";
params [["_control",controlNull,[controlNull]],["_index",-1,[0]]];
/* Error checks */
if(EQUAL(_index,-1) OR isNull _control) exitWith {};
_saveData = GVAR_PNS format["tawvd_slot_%1",_index];
if(isNil "_saveData") exitWith {};
/* Set variables to chosen slot data */
CONTROL(MENU_IDD,SLOT_NAME) ctrlSetText (SEL(_saveData,0));
SVAR_MNS ["tawvd_foot",SEL(_saveData,1)];
SVAR_MNS ["tawvd_car",SEL(_saveData,2)];
SVAR_MNS ["tawvd_air",SEL(_saveData,3)];
SVAR_MNS ["tawvd_drone",SEL(_saveData,4)];
SVAR_MNS ["tawvd_object",SEL(_saveData,5)];
SVAR_MNS ["tawvd_syncObject",SEL(_saveData,6)];
/* Update Menu & View Distance */
[] call TAWVD_fnc_updateViewDistance;
[] call TAWVD_fnc_openMenu;

View File

@ -0,0 +1,35 @@
#include "defines.h"
/*
Author: Bryan "Tonic" Boardwine
Description:
Called when the slider is changed for any field and
updates the view distance for it.
*/
private "_varData";
params [["_mode",-1,[0]],["_value",-1,[0]]];
if(EQUAL(_mode,-1) OR EQUAL(_value,-1)) exitWith {};
disableSerialization;
_varData = switch(_mode) do {
case 0: {["tawvd_foot",INFANTRY_EDIT]};
case 1: {["tawvd_car",GROUND_EDIT]};
case 2: {["tawvd_air",AIR_EDIT]};
case 3: {["tawvd_object",OBJECT_EDIT]};
case 4: {["tawvd_drone",DRONE_EDIT]};
};
SVAR_MNS [SEL(_varData,0),round(_value)];
ctrlSetText[SEL(_varData,1),str(GVAR_MNS SEL(_varData,0))];
[] call TAWVD_fnc_updateViewDistance;
if(EQUAL(_mode,3)) then {
setObjectViewDistance [tawvd_object,100];
};
if(tawvd_syncObject) then {
sliderSetPosition[OBJECT_SLIDER, tawvd_object];
ctrlSetText[OBJECT_EDIT,str(tawvd_object)];
};

View File

@ -0,0 +1,17 @@
/*
Author: Bryan "Tonic" Boardwine
Description:
Updates the players terraingrid when called.
*/
private "_type";
_type = param [0,"",[""]];
if(_type == "") exitWith {};
switch (_type) do {
case "none": {if(isNil "tawvd_disablenone") then {setTerrainGrid 50;};};
case "low": {setTerrainGrid 30;};
case "norm": {setTerrainGrid 12.5;};
case "high": {setTerrainGrid 3.125;};
};

41
taw_vd/fn_openMenu.sqf Normal file
View File

@ -0,0 +1,41 @@
#include "defines.h"
/*
Author: Bryan "Tonic" Boardwine
Description:
Called via addAction and opens the TAW View Distance Menu
*/
if(isNull (findDisplay MENU_IDD)) then {
if(!createDialog "TAW_VDMenu") exitWith {hint "Something went wrong, the menu won't open?"};
};
disableSerialization;
{
ctrlSetText[SEL(_x,0),str(SEL(_x,1))];
} foreach [[INFANTRY_EDIT,tawvd_foot],[GROUND_EDIT,tawvd_car],[AIR_EDIT,tawvd_air],[OBJECT_EDIT,tawvd_object],[DRONE_EDIT,tawvd_drone]];
//Setup the sliders
{
if(!isNil "tawvd_maxRange") then {
slidersetRange [_x select 0,100,tawvd_maxRange];
} else {
slidersetRange [_x select 0,100,20000];
};
((findDisplay MENU_IDD) displayCtrl (_x select 0)) sliderSetSpeed [100,100,100];
sliderSetPosition[_x select 0, _x select 1];
} foreach [[INFANTRY_SLIDER,tawvd_foot],[GROUND_SLIDER,tawvd_car],[AIR_SLIDER,tawvd_air],[OBJECT_SLIDER,tawvd_object],[DRONE_SLIDER,tawvd_drone]];
((findDisplay MENU_IDD) displayCtrl 2931) cbSetChecked tawvd_syncObject;
if(tawvd_syncObject) then {
ctrlEnable [OBJECT_SLIDER,false];
ctrlEnable [OBJECT_EDIT,false];
} else {
ctrlEnable [OBJECT_SLIDER,true];
ctrlEnable [OBJECT_EDIT,true];
};
//Lets disable it..
if(!isNil "tawvd_disablenone") then {
ctrlEnable [TERRAIN_NONE,false];
};

View File

@ -0,0 +1,31 @@
#include "defines.h"
/*
Author: Bryan "Tonic" Boardwine
Description:
Updates the view distance dependant on whether the player
is on foot, a car or an aircraft.
*/
private ["_controlGrp","_saveList"];
disableSerialization;
/* Store displays */
_controlGrp = CONTROL(MENU_IDD,MANAGER_GROUP);
_saveList = CONTROL(MENU_IDD,SAVES_LIST);
lbClear _saveList; //Purge the list
/* Make the Saves manager group visible */
_controlGrp ctrlSetfade 0;
_controlGrp ctrlCommit .3;
/* Fill the listbox */
for "_i" from 0 to 9 do {
_varData = GVAR_PNS format["tawvd_slot_%1",_i];
if(!isNil "_varData") then {
_saveList lbAdd SEL(_varData,0);
_saveList lbSetData [(lbSize _saveList)-1,"true"];
} else {
_saveList lbAdd format["Save Slot %1",_i];
_saveList lbSetData [(lbSize _saveList)-1,"false"];
};
};

196
taw_vd/fn_stateTracker.fsm Normal file
View File

@ -0,0 +1,196 @@
/*%FSM<COMPILE "scriptedFSM.cfg, TAW_VD State Tracker">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-39.234997,-157.457230,50.765003,-107.457222,0.000000,"init"};
item1[] = {"true",8,218,-39.286701,-67.901810,50.713299,-17.901814,0.000000,"true"};
item2[] = {"I_am_a_loop__",2,250,-37.913574,2.551729,52.086441,52.551727,0.000000,"I am a loop.."};
item3[] = {"Dead_Player",4,4314,-137.117889,56.721581,-47.117889,106.721581,0.000000,"Dead Player"};
item4[] = {"I_am_dead_Set_my",2,250,-215.837250,109.620483,-125.837227,159.620499,0.000000,"I am dead" \n "Set my corpse"};
item5[] = {"Alive_player",4,218,-215.185760,16.088562,-125.185867,66.088623,0.000000,"Alive player"};
item6[] = {"Re_add_my_action",2,250,-215.481354,-68.055023,-125.481308,-18.054995,0.000000,"Re-add my" \n "action please"};
item7[] = {"State_changed",4,218,107.007217,1.512135,197.007202,51.512016,0.000000,"State changed"};
item8[] = {"Update_me",2,250,107.804337,-67.884735,197.804352,-17.884773,0.000000,"Update me"};
link0[] = {0,1};
link1[] = {1,2};
link2[] = {2,3};
link3[] = {2,7};
link4[] = {3,4};
link5[] = {4,5};
link6[] = {5,6};
link7[] = {6,1};
link8[] = {7,8};
link9[] = {8,1};
globals[] = {0.000000,0,0,0,0,640,480,1,12,6316128,1,-604.631348,604.623535,339.349304,-422.033386,1146,884,1};
window[] = {2,-1,-1,-1,-1,1340,208,1648,580,3,1164};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "TAW_VD State Tracker";
class States
{
/*%FSM<STATE "init">*/
class init
{
name = "init";
itemno = 0;
init = /*%FSM<STATEINIT""">*/"private [""_playerState"",""_corpse"",""_actionID"",""_droneState""];" \n
"" \n
"_playerState = vehicle player;" \n
"_droneState = UAVControl (getConnectedUAV player) select 1;" \n
"tawvd_addon_disable = true;" \n
"" \n
"if(isNil {profileNamespace getVariable ""tawvd_foot""}) then {" \n
" profileNamespace setVariable [""tawvd_foot"",viewDistance];" \n
" profileNamespace setVariable [""tawvd_car"",viewDistance];" \n
" profileNamespace setVariable [""tawvd_air"",viewDistance];" \n
" profileNamespace setVariable [""tawvd_drone"",viewDistance];" \n
" profileNamespace setVariable [""tawvd_object"",viewDistance];" \n
" saveProfileNamespace;" \n
"};" \n
"" \n
"tawvd_foot = profileNamespace getVariable [""tawvd_foot"",viewDistance];" \n
"tawvd_car = profileNamespace getVariable [""tawvd_car"",viewDistance];" \n
"tawvd_air = profileNamespace getVariable [""tawvd_air"",viewDistance];" \n
"tawvd_drone = profileNamespace getVariable [""tawvd_drone"",viewDistance];" \n
"tawvd_object = profileNamespace getVariable [""tawvd_object"",viewDistance];" \n
"" \n
"tawvd_syncObject = true;" \n
"if(!isNil ""ace_interact_menu_fnc_createAction"") then {" \n
" _actionID = [""tawvd_menu"",""View Distance Settings"","""",{[] call TAWVD_fnc_openMenu},{true}] call ace_interact_menu_fnc_createAction;" \n
" [typeOf player, 1, [""ACE_SelfActions""], _actionID] call ace_interact_menu_fnc_addActionToClass;" \n
"} else {" \n
" _actionID = player addAction[""<t color='#FF0000'>Settings</t>"",TAWVD_fnc_openMenu,[],-99,false,false,"""",''];" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
itemno = 1;
priority = 0.000000;
to="I_am_a_loop__";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "I_am_a_loop__">*/
class I_am_a_loop__
{
name = "I_am_a_loop__";
itemno = 2;
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "State_changed">*/
class State_changed
{
itemno = 7;
priority = 0.000000;
to="Update_me";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(vehicle player != _playerState OR (UAVControl getConnectedUAV player select 1) != _droneState)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Dead_Player">*/
class Dead_Player
{
itemno = 3;
priority = 0.000000;
to="I_am_dead_Set_my";
precondition = /*%FSM<CONDPRECONDITION""">*/"isNil ""ace_interact_menu_fnc_createAction"""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!alive player && isNil ""ace_interact_menu_fnc_createAction"""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "I_am_dead_Set_my">*/
class I_am_dead_Set_my
{
name = "I_am_dead_Set_my";
itemno = 4;
init = /*%FSM<STATEINIT""">*/"_corpse = player;" \n
"_corpse removeAction _actionID;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/"isNil ""ace_interact_menu_fnc_createAction""" \n
""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Alive_player">*/
class Alive_player
{
itemno = 5;
priority = 0.000000;
to="Re_add_my_action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"alive player"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Re_add_my_action">*/
class Re_add_my_action
{
name = "Re_add_my_action";
itemno = 6;
init = /*%FSM<STATEINIT""">*/"if(isNil ""ace_interact_menu_fnc_createAction"") then {" \n
" _actionID = player addAction[""<t color='#FF0000'>Settings</t>"",TAWVD_fnc_openMenu,[],-99,false,false,"""",''];" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
itemno = 1;
priority = 0.000000;
to="I_am_a_loop__";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Update_me">*/
class Update_me
{
name = "Update_me";
itemno = 8;
init = /*%FSM<STATEINIT""">*/"[] call TAWVD_fnc_updateViewDistance;" \n
"_playerState = vehicle player;" \n
"_droneState = UAVControl (getConnectedUAV player) select 1;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
itemno = 1;
priority = 0.000000;
to="I_am_a_loop__";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="init";
finalStates[] =
{
};
};
/*%FSM</COMPILE>*/

View File

@ -0,0 +1,35 @@
#include "defines.h"
/*
Author: Bryan "Tonic" Boardwine
Description:
Updates the view distance dependant on whether the player
is on foot, a car or an aircraft.
*/
private "_dist";
switch (true) do {
case (!(EQUAL(SEL(UAVControl getConnectedUAV player,1),""))): {
setViewDistance tawvd_drone;
_dist = tawvd_drone;
};
case ((vehicle player) isKindOf "Man"): {
setViewDistance tawvd_foot;
_dist = tawvd_foot;
};
case (((vehicle player) isKindOf "LandVehicle") || ((vehicle player) isKindOf "Ship")): {
setViewDistance tawvd_car;
_dist = tawvd_car;
};
case ((vehicle player) isKindOf "Air"): {
setViewDistance tawvd_air;
_dist = tawvd_air;
};
};
if(tawvd_syncObject) then {
setObjectViewDistance [_dist,100];
tawvd_object = _dist;
};

2
teleportBoats.sqf Normal file
View File

@ -0,0 +1,2 @@
[] remoteExec ["busterTele", [0,2]];
removeAllActions LCA_Alpha;