Set up mission autorun. Beefed up enemy numbers where appropriate. Reduced allied NPC numbers to reduce server load. Tightened up auto-detection of mission completion etc. Integrated some newer learnings like custom functions and stuff. Still a couple things left to do to get mission-ready (primarily flavour text and loadouts)

This commit is contained in:
2026-05-21 00:37:08 +10:00
parent 189519bcb3
commit dd7ecb0dd6
17 changed files with 17565 additions and 4494 deletions
+20
View File
@@ -18,6 +18,26 @@ respawnTemplates[] = {"MenuPosition"};
respawnOnStart = 0;
respawnDialog = 1;
// To Do
// - Finish loadouts (tankers done?)
// - Mission briefing, task descriptions etc.
// - Server test
// - Spare tracks etc.
class CfgFunctions
{
#include "taw_vd\CfgFunctions.hpp"
class CLRK
{
tag = "CLRK";
class Layers
{
file = "functions";
class toggleLayerSim {};
};
};
};
class ACEX_Fortify_Presets {
class TAG_Fortifications {
displayName = "Fortifications";
+43
View File
@@ -0,0 +1,43 @@
/*
Author:
Clarky
Last Updated:
06-05-2026
Description:
This function mimics the default functionality of the Show/Hide editor module, with the addition of allowing or disallowing damage.
Show/Hide does NOT toggle damage states on affected units, meaning you can hide a unit but it will still be affected by nearby explosions or vehicle collisions once un-hidden. Suboptimal for densely packed and layered instances where you may be hiding a number of different units/objects across different stages of an op.
This functionality can be applied to an entire layer of entities, making it easy to set up layers of units that will remain hidden, not simulating, and not processing any damage event until such a time as you are ready.
Paramters:
0: STRING - Name of the layer you wish to enable/disable
1: BOOLEAN - true = enable layer, false = disable layer
Returns:
BOOLEAN
Examples:
["Objective01-Assault", true] call TAG_fnc_toggleLayerSim;
*/
// Define variables. _layerName is the input parameter for the name of the layer, _show is the true/false value to turn the named layer on or off
params ["_layerName", "_show"];
// Import data based on provided parameters
private _layerEntities = getMissionLayerEntities _layerName;
private _objects = _layerEntities select 0;
private _allowDamage = _show;
private _enableSim = _show;
private _hideObj = !_show;
// Run the code based on provided input.
// First brackets input the current looped object (_x) and the toggle on/off for the relevant simulation requirement as set in the params
// The second bracket of params lists the desired variable to update based on the input (e.g allowDamage = _allowDamage, the locality of the remoteExec (0 = Server + Client), and if the call should be persistent or not (true = JIP users will also run this code, ensuring state parity)
{
[_x, _allowDamage] remoteExec ["allowDamage", 0, true];
[_x, _enableSim] remoteExec ["enableSimulationGlobal", 0, true];
[_x, _hideObj] remoteExec ["hideObjectGlobal", 0, true];
} forEach _objects;
true;
+18 -18
View File
@@ -1,26 +1,26 @@
// Trigger variables for frontline activation/deactivation
missionNameSpace setVariable ["var_show_northwest", false, true];
missionNameSpace setVariable ["var_show_north", false, true];
missionNameSpace setVariable ["var_show_northeast", false, true];
missionNameSpace setVariable ["var_show_east", false, true];
missionNamespace setVariable ["var_show_northwest", false, true];
missionNamespace setVariable ["var_show_north", false, true];
missionNamespace setVariable ["var_show_northeast", false, true];
missionNamespace setVariable ["var_show_east", false, true];
// Trigger variables for tasking
missionNameSpace setVariable ["var_task_00_rtbCreate", false, true];
missionNameSpace setVariable ["var_task_00_rtb", true, true];
missionNameSpace setVariable ["var_task_01_defendNortheast", false, true];
missionNameSpace setVariable ["var_task_02_destroyArmor", false, true];
missionNameSpace setVariable ["var_task_03_eliminateHVT", false, true];
missionNameSpace setVariable ["var_task_04_supportRetreat", false, true];
missionNameSpace setVariable ["var_task_05_repelNorthwestBreakthrough", false, true];
missionNameSpace setVariable ["var_task_06_defendNorth", false, true];
missionNameSpace setVariable ["var_task_07_repelEastBreakthrough", false, true];
missionNameSpace setVariable ["var_task_08_defendEast", false, true];
missionNameSpace setVariable ["var_task_09_delayGermanArmor", false, true];
missionNameSpace setVariable ["var_task_10_retreat", false, true];
missionNamespace setVariable ["var_task_01_defendNortheast", false, true];
missionNamespace setVariable ["var_task_02_destroyArmor", false, true];
missionNamespace setVariable ["var_task_03_eliminateHVT", false, true];
missionNamespace setVariable ["var_task_04_supportRetreat", false, true];
missionNamespace setVariable ["var_task_05_repelNorthwestBreakthrough", false, true];
missionNamespace setVariable ["var_task_06_defendNorth", false, true];
missionNamespace setVariable ["var_task_07_repelEastBreakthrough", false, true];
missionNamespace setVariable ["var_task_08_defendEast", false, true];
missionNamespace setVariable ["var_task_09_delayGermanArmor", false, true];
missionNamespace setVariable ["var_task_10_retreat", false, true];
// Task completion variables for autorun
missionNamespace setVariable ["autoRun", false, true];
// misc
missionNameSpace setVariable ["var_task_04_set_retreat_order", false, true];
missionNamespace setVariable ["var_task_04_set_retreat_order", false, true];
// Time passage speed
setTimeMultiplier 2;
+16287 -4422
View File
File diff suppressed because one or more lines are too long
+18 -54
View File
@@ -1,57 +1,30 @@
_createRTB = mapObjectiveCommand addAction [
"CREATE TASK - RTB",
autoRunMission = mapObjectiveCommand addAction [
"AUTO RUN MISSION",
{
params ["_target", "_caller", "_actionID"];
var_task_00_rtbCreate = true;
var_task_01_defendNortheast = true;
missionNamespace setVariable ["autoRun", true, true];
publicVariable "var_task_01_defendNortheast";
_target removeAction _actionID;
},
nil,
1.5,
true,
true,
"",
"_this == missionCommander",
3,
false,
"",
""
];
_setRTB = mapObjectiveCommand addAction [
"SET TASK - RTB",
{["00", "ASSIGNED"] call BIS_fnc_taskSetState;},
nil,
1.5,
true,
true,
"",
"_this == missionCommander",
3,
false,
"",
""
];
_completeRTB = mapObjectiveCommand addAction [
"COMPLETE TASK - RTB",
{["00", "SUCCEEDED"] call BIS_fnc_taskSetState;},
nil,
1.5,
true,
true,
"",
"_this == missionCommander",
"true",
3,
false,
"",
""
];
];
_task01DefendNorthEast = mapObjectiveCommand addAction [
"1. SET TASK - Defend Northeast Frontline",
{
params ["_target", "_caller", "_actionID"];
var_task_01_defendNortheast = true;
publicVariable "var_task_01_defendNortheast";
missionNamespace setVariable ["var_task_01_defendNortheast", true, true];
_target removeAction _actionID;
},
nil,
@@ -70,8 +43,7 @@ _task02DestroyArmor = mapObjectiveCommand addAction [
"2. SET TASK - Destroy German Armor",
{
params ["_target", "_caller", "_actionID"];
var_task_02_destroyArmor = true;
publicVariable "var_task_02_destroyArmor";
missionNamespace setVariable ["var_task_02_destroyArmor", true, true];
_target removeAction _actionID;
},
nil,
@@ -90,8 +62,7 @@ _task03EliminateHVT = mapObjectiveCommand addAction [
"3. SET TASK - Eliminate HVT",
{
params ["_target", "_caller", "_actionID"];
var_task_03_eliminateHVT = true;
publicVariable "var_task_03_eliminateHVT";
missionNamespace setVariable ["var_task_03_eliminateHVT", true, true];
_target removeAction _actionID;
},
nil,
@@ -110,8 +81,7 @@ _task04SupportRetreat = mapObjectiveCommand addAction [
"4. SET TASK - Support Retreat",
{
params ["_target", "_caller", "_actionID"];
var_task_04_supportRetreat = true;
publicVariable "var_task_04_supportRetreat";
missionNamespace setVariable ["var_task_04_supportRetreat", true, true];
_target removeAction _actionID;
},
nil,
@@ -130,8 +100,7 @@ _task05RepelNorthwesternBrekathrough = mapObjectiveCommand addAction [
"5. SET TASK - Repel NW Breakthrough",
{
params ["_target", "_caller", "_actionID"];
var_task_05_repelNorthwestBreakthrough = true;
publicVariable "var_task_05_repelNorthwestBreakthrough";
missionNamespace setVariable ["var_task_05_repelNorthwestBreakthrough", true, true];
_target removeAction _actionID;
},
nil,
@@ -150,8 +119,7 @@ _task06DefendNorth = mapObjectiveCommand addAction [
"6. SET TASK - Defend North",
{
params ["_target", "_caller", "_actionID"];
var_task_06_defendNorth = true;
publicVariable "var_task_06_defendNorth";
missionNamespace setVariable ["var_task_06_defendNorth", true, true];
_target removeAction _actionID;
},
nil,
@@ -170,8 +138,7 @@ _task07RepelEasternBreakthrough = mapObjectiveCommand addAction [
"7. SET TASK - Repel E Breakthrough",
{
params ["_target", "_caller", "_actionID"];
var_task_07_repelEastBreakthrough = true;
publicVariable "var_task_07_repelEastBreakthrough";
missionNamespace setVariable ["var_task_07_repelEastBreakthrough", true, true];
_target removeAction _actionID;
},
nil,
@@ -190,8 +157,7 @@ _task08DefendEast = mapObjectiveCommand addAction [
"8. SET TASK - Defend East",
{
params ["_target", "_caller", "_actionID"];
var_task_08_defendEast = true;
publicVariable "var_task_08_defendEast";
missionNamespace setVariable ["var_task_08_defendEast", true, true];
_target removeAction _actionID;
},
nil,
@@ -210,8 +176,7 @@ _task09DelayArmor = mapObjectiveCommand addAction [
"9. SET TASK - Delay Armor",
{
params ["_target", "_caller", "_actionID"];
var_task_09_delayGermanArmor = true;
publicVariable "var_task_09_delayGermanArmor";
missionNamespace setVariable ["var_task_09_delayGermanArmor", true, true];
_target removeAction _actionID;
},
nil,
@@ -230,8 +195,7 @@ _task10Retreat = mapObjectiveCommand addAction [
"10. SET TASK - Retreat",
{
params ["_target", "_caller", "_actionID"];
var_task_10_retreat = true;
publicVariable "var_task_10_retreat";
missionNamespace setVariable ["var_task_10_retreat", true, true];
_target removeAction _actionID;
},
nil,
+21
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
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
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
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;
+27
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;
+28
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;
+35
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)];
};
+17
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
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];
};
+31
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
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>*/
+35
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;
};