debriefing.hpp #%\ description.ext KA\ functions\common.hpp FKA\ functions\fhq_safeAddLoadout.hpp 6V{ functions\FHQ_safeAddLoadout\FHQ_fnc_safeAddLoadout.sqf .T= functions\fhq_tasktracker.hpp ."\ functions\FHQ_tasktracker\fn_ttAddBriefing.sqf 6Ww functions\FHQ_tasktracker\fn_ttAddBriefingGroup.sqf Z functions\FHQ_tasktracker\fn_ttAddTaskGroup.sqf ?Z functions\FHQ_tasktracker\fn_ttAddTasks.sqf i\ functions\FHQ_tasktracker\fn_ttAreTasksCompleted.sqf 6W functions\FHQ_tasktracker\fn_ttAreTasksSuccessful.sqf 6W functions\FHQ_tasktracker\fn_ttGetAllTasksWithState.sqf 6WG functions\FHQ_tasktracker\fn_ttGetTaskState.sqf 6W functions\FHQ_tasktracker\fn_ttiAddBriefingEntry.sqf 6W9 functions\FHQ_tasktracker\fn_ttiBuildCondition.sqf :
\m functions\FHQ_tasktracker\fn_ttiCreateOrUpdateTask.sqf i\G functions\FHQ_tasktracker\fn_ttiFilterUnits.sqf 6ZX4 functions\FHQ_tasktracker\fn_ttiGetTaskDesc.sqf 6W functions\FHQ_tasktracker\fn_ttiGetTaskId.sqf 6W functions\FHQ_tasktracker\fn_ttiGetTaskName.sqf 6Wm functions\FHQ_tasktracker\fn_ttiGetTaskState.sqf !i\] functions\FHQ_tasktracker\fn_ttiGetTaskTarget.sqf 6W functions\FHQ_tasktracker\fn_ttiGetTaskTitle.sqf 6W functions\FHQ_tasktracker\fn_ttiGetTaskType.sqf 6WC functions\FHQ_tasktracker\fn_ttiGetTaskWp.sqf 6W functions\FHQ_tasktracker\fn_ttiHasBriefingEntry.sqf 6W functions\FHQ_tasktracker\fn_ttiInit.sqf 2Zq functions\FHQ_tasktracker\fn_ttiIsFilter.sqf 6W functions\FHQ_tasktracker\fn_ttiIsTaskState.sqf 6W functions\FHQ_tasktracker\fn_ttiMissionBriefing.sqf 6W) functions\FHQ_tasktracker\fn_ttiMissionTasks.sqf 6W, functions\FHQ_tasktracker\fn_ttiPostInit.sqf x;Z functions\FHQ_tasktracker\fn_ttIsTaskCompleted.sqf 6W functions\FHQ_tasktracker\fn_ttIsTaskSuccessful.sqf 6WL functions\FHQ_tasktracker\fn_ttiTaskExists.sqf 6WQ functions\FHQ_tasktracker\fn_ttiUnitBriefing.sqf 6Wg functions\FHQ_tasktracker\fn_ttiUnitTasks.sqf 6W^ functions\FHQ_tasktracker\fn_ttiUpdateBriefingList.sqf LZXM functions\FHQ_tasktracker\fn_ttiUpdateTaskList.sqf Qd\ functions\FHQ_tasktracker\fn_ttMissionFlow.sqf x\ functions\FHQ_tasktracker\fn_ttSetTaskDescription.sqf xZC functions\FHQ_tasktracker\fn_ttSetTaskState.sqf 6Wx functions\FHQ_tasktracker\fn_ttSetTaskStateAndNext.sqf 6W$ functions\FHQ_tasktracker\fn_ttSetTaskTarget.sqf Zt functions\FHQ_tasktracker\fn_ttSetTaskTargetAndTitles.sqf Z functions\FHQ_tasktracker\fn_ttSetTaskTitle.sqf nZ? functions\FHQ_tasktracker\fn_ttSetTaskTitles.sqf lZ functions\FHQ_tasktracker\fn_ttTaskHint.sqf ZS functions\fhq_weatherEffect.hpp ,\ functions\FHQ_weatherEffect\fn_setWeatherEffect.sqf Ң\ functions\FHQ_weatherEffect\fn_weatherEffect.sqf Ң\ functions\taw_vd\CfgFunctions.hpp KA\ functions\taw_vd\defines.h P0V7 functions\taw_vd\fn_onChar.sqf /V functions\taw_vd\fn_onSavePressed.sqf |R0V functions\taw_vd\fn_onSaveSelectionChanged.sqf bP0V functions\taw_vd\fn_onSliderChanged.sqf P/V functions\taw_vd\fn_onTerrainChanged.sqf /V functions\taw_vd\fn_openMenu.sqf ı/V functions\taw_vd\fn_openSaveManager.sqf O0VD functions\taw_vd\fn_stateTracker.fsm K0V functions\taw_vd\fn_updateViewDistance.sqf /V functions\taw_vd\GUI.h nI0VGO functions\weatherEffects.fsm Ң\r images\loadscreen.jpg )\i init.sqf JjE`C mission.sqm kE` scripts\ammobox\ammo.sqf l:\I scripts\briefing.sqf O4\ scripts\briefing_loadout.hpp ')\ scripts\infotext.sqf %\ scripts\loadouts\regular.sqf 7)\ scripts\loadouts\team_lead.sqf )\K scripts\parameters.hpp %\ scripts\weatherScript.sqf !,\y class Win
{
title = "Mission Accomplished";
subtitle = "Devil Castle Is Ours";
description = "CDF and US forces will arrive in shortly to secure the weapon cache in Devil's castle. Good work on eliminating the Chedaki forces moving in the secure Devil Castle. There'll be less towns in Chernarus getting terrorize tonight and people can enjoy the holidays in peace.";
pictureBackground = "images\loadscreen.jpg";
}
class Lose
{
title = "Mission Failed";
subtitle = "Terror Before Christmas";
description = "Chedaki forces have regroup at Devil's castle and rearm themselves with lots of grenades. Everyone's getting a frag under their Christmas trees.";
pictureBackground = "images\loadscreen.jpg";
}
overviewPicture = "images\loadscreen.jpg";
author="Phantom Six";
loadScreen = "images\loadscreen.jpg";
OnLoadName = "Snowblind Blizeye";
OnLoadMission = "Mercenaries on winter budget capture Devil's Castle";
debriefing = 1;
allowFunctionsRecompile = 1;
class Header
{
gameType = Coop;
minPlayers = 1;
maxPlayers = 10;
playerCountMultipleOf = 1;
};
respawn = "SIDE";
respawnDelay = 5;
class CfgDebriefing
{
#include "debriefing.hpp"
};
#include "functions\taw_vd\GUI.h"
class CfgFunctions {
#include "functions\common.hpp"
};
class Params
{
#include "scripts\parameters.hpp"
};
#include "scripts\briefing_loadout.hpp"
#define INTERNAL_FUNCTION(x) \
class x \
{ \
description = "Internal Function"; \
};
#define EXPORTED_FUNCTION(x,y) \
class x \
{ \
description = y; \
};
#include "taw_vd\CfgFunctions.hpp"
class FHQ
{
#include "fhq_safeAddLoadout.hpp"
#include "fhq_tasktracker.hpp"
#include "fhq_weatherEffect.hpp"
};
class FHQ_safeAddLoadout
{
class safeAddLoadout {file = "functions\FHQ_safeAddLoadout\FHQ_fnc_safeAddLoadout.sqf";};
};_unit = _this select 0;
_scriptName = _this select 1;
if (!local _unit) exitWith {};
_isHandled = _unit getVariable "FHQ_loadout_handled";
if (isNil "_isHandled") then {
_unit setVariable ["FHQ_loadout_handled", true, true];
_unit call compile preprocessFileLineNumbers _scriptName;
};#define INTERNAL_FUNCTION(x) \
class x \
{ \
description = "Internal Function"; \
};
#define EXPORTED_FUNCTION(x,y) \
class x \
{ \
description = y; \
};
class TaskTrackerInternal {
tag="FHQ";
file="functions\fhq_tasktracker";
class ttiInit
{
description = "Internal function, called automatically";
preInit = 1;
};
class ttiPostInit
{
description = "Internal function, called automatically";
postInit = 1;
};
INTERNAL_FUNCTION(ttifilterUnits)
INTERNAL_FUNCTION(ttiAddBriefingEntry)
INTERNAL_FUNCTION(ttiHasBriefingEntry)
INTERNAL_FUNCTION(ttiUpdateBriefingList)
INTERNAL_FUNCTION(ttiGetTaskId)
INTERNAL_FUNCTION(ttiGetTaskDesc)
INTERNAL_FUNCTION(ttiGetTaskTitle)
INTERNAL_FUNCTION(ttiGetTaskWp)
INTERNAL_FUNCTION(ttiGetTaskTarget)
INTERNAL_FUNCTION(ttiGetTaskState)
INTERNAL_FUNCTION(ttiGetTaskName)
INTERNAL_FUNCTION(ttiGetTaskType)
INTERNAL_FUNCTION(ttiTaskExists)
INTERNAL_FUNCTION(ttiCreateOrUpdateTask)
INTERNAL_FUNCTION(ttiUpdateTaskList)
INTERNAL_FUNCTION(ttiMissionTasks)
INTERNAL_FUNCTION(ttiMissionBriefing)
INTERNAL_FUNCTION(ttiUnitTasks)
INTERNAL_FUNCTION(ttiUnitBriefing)
INTERNAL_FUNCTION(ttiIsFilter)
INTERNAL_FUNCTION(ttiIsTaskState)
INTERNAL_FUNCTION(ttiBuildCondition)
};
class TaskTracker {
tag="FHQ";
file="functions\fhq_tasktracker";
EXPORTED_FUNCTION(ttTaskHint, "This function is called for every task hint to be displayed.")
EXPORTED_FUNCTION(ttAddBriefing, "Adds a briefing to the missing.")
EXPORTED_FUNCTION(ttAddTasks, "Adds tasks to the mission.")
EXPORTED_FUNCTION(ttGetTaskState, "Return the state of a task.")
EXPORTED_FUNCTION(ttSetTaskState, "Set the new state of a task.")
EXPORTED_FUNCTION(ttIsTaskCompleted, "Check whether a given task is completed")
EXPORTED_FUNCTION(ttAreTasksCompleted, "Check whether a list of tasks is completed")
EXPORTED_FUNCTION(ttIsTaskSuccessful, "Check whether a given task is successfully completed")
EXPORTED_FUNCTION(ttAreTasksSuccessful, "Check whether a list of tasks is successfully completed")
EXPORTED_FUNCTION(ttGetAllTasksWithState, "Return an array of all tasks with a given state")
EXPORTED_FUNCTION(ttSetTaskStateAndNext, "Set a task's state, and select the next one")
EXPORTED_FUNCTION(ttSetTaskTarget, "Change a task target")
EXPORTED_FUNCTION(ttSetTaskDescription, "Change a task description")
EXPORTED_FUNCTION(ttSetTaskTitle, "Change a task title")
EXPORTED_FUNCTION(ttSetTaskTitles, "Change title and description")
EXPORTED_FUNCTION(ttSetTaskTargetAndTitles, "Change target, title and description")
EXPORTED_FUNCTION(ttAddTaskGroup, "Adds an EdenTT defined group of tasks.")
EXPORTED_FUNCTION(ttAddBriefingGroup, "Adds an EdenTT defined briefing.")
EXPORTED_FUNCTION(ttMissionFlow, "Control mission flow automatically.")
};
/* FHQ_fnc_ttAddBriefing: Add a full briefing
*
* This functions receives an array as input. The elements of the input array
* are interpreted as follows:
* If the element is a two-element array consisting of two strings, the entry is
* interpreted as a new briefing topic. If the array has three strings, it's interpreted
* as a new briefing entry, with the first one being the general subject ("Diary" by default),
* and the two subsequent strings title and description.
* If the element is anything else, the following topics will only be presented to
* the units matching the element. For example, if the element is a group, the following
* entries are added to this group only.
*
* NOTE: The old hierarchical filtering is no longer supported. It wasn't that useful for
* real-world application and was posing severe problems with respawn missions.
*
* Example:
*
* [
* west,
* ["Mission", "Get some!"],
* ["Enemy Forces", "There's lots of ruskies around"],
* east,
* ["Mission", "Get those imperialistic americans"],
* ["Current Supply of Vodka", "Low"],
* {true},
* ["Credits", "Mission by", "Some Dude"],
* ["Credits", "Uses scripts by", "Some other dude
Yet another dude"]
* ] call FHQ_fnc_ttAddBriefing.
*
* The first two lines (Mission, Enemy Forces), are added under "Briefing" for west
* troops only, the second two lines (Mission, Current Supply of Vodka) only for east.
* The last two lines add two new entries "Mission by" and "Uses scripts by" into a new
* subject "Credits".
*
* NOTE: Do not over-use the additional subject feature. Briefing and all associated information
* should go to the default subject.
*
* Calling FHQ_TT_addBriefing with an already existing subject/title will add a new log entry
* if the text differs from the previous one.
*
* Notifications are shown after the initial briefing has been donwloaded by the clients, i.e.
* not at mission start, only when new briefing entries are added.
*/
private ["_currentFilter", "_i", "_current", "_x"];
_currentFilter = {true};
if (isServer) then {
/* Note: Server only code. Briefing entries must be added on the server, not on an
* individual client
*/
for [{_i = 0}, {_i < count _this}, {_i = _i + 1}] do {
_current = _this select _i;
if (_current call FHQ_fnc_ttiIsFilter) then {
_currentFilter = nil;
_currentFilter = _current;
} else {
/* It's a briefing entry. */
[_currentFilter, _current] call FHQ_fnc_ttiAddBriefingEntry;
};
};
publicVariable "FHQ_TTI_BriefingList";
if (!isDedicated) then {
FHQ_TTI_BriefingList call FHQ_fnc_ttiUpdateBriefingList;
};
FHQ_TTI_briefing = true;
publicVariable "FHQ_TTI_briefing";
};
/* FHQ_fnc_ttAddBriefingGroup: Add EdenTT defined briefing group
*
* For more information on the definition of briefing groups, see the
* EdenTT manual and examples.
*
* This function adds a given briefing group to the units defined by the filter.
* The filter itself follows the same rules as filters in FHQ_fnc_ttAddTasks.
*
* Usage: [_filter, _briefingGroup] call FHQ_fnc_ttAddBriefingGroup;
* _filter: A filter similar to that given in FHQ_fnc_ttAddTask/ttAddBriefing.
* _briefingGroup: Name of the briefing group to add.
*
* Example:
* // Add briefing from brief1 to units p1, p2, and p3
* [[p1, p2, p3], "brief1"] call FHQ_fnc_ttAddBriefingGroup;
*
*/
params [
["_filter", {true}],
["_briefingGroup", "", [""]]
];
if (isServer) then {
private _briefings = missionNamespace getVariable ["FHQ_tt_MissionBriefing", []];
private _units = (if (isMultiplayer) then {playableUnits+FHQ_TTI_extraUnits} else {switchableUnits});
private _i = 0;
_units = [_filter, _units] call FHQ_fnc_ttiFilterUnits;
if (count _units == 0) exitWith {/* Nothing to be done */};
for [{_i = 0}, {_i < count _briefings}, {_i = _i + 1}] do
{
private _briefing = _briefings select _i;
private _group = _briefing select 0;
private _entry = _briefing select 1;
if (_briefingGroup isEqualTo _group) then {
([_units] + _entry) call FHQ_fnc_ttAddBriefing;
};
};
};/* FHQ_fnc_ttAddTaskGroup: Add EdenTT defined task group
*
* For more information on the definition of task groups, see the
* EdenTT manual and examples.
*
* This function adds a given task group to the units defined by the filter.
* The filter itself follows the same rules as filters in FHQ_fnc_ttAddTasks.
*
* Usage: [_filter, _taskGroup] call FHQ_fnc_ttAddTaskGroup;
* _filter: A filter similar to that given in FHQ_fnc_ttAddTask/ttAddBriefing.
* _taskGroup: Name of the task group to add.
*
* Example:
* // Add tasks from task1group to units p1, p2, and p3
* [[p1, p2, p3], "task1group"] call FHQ_fnc_ttAddTaskGroup;
*
* // Add task from westTasks to all west units
* [west, "westTasks"] call FHQ_fnc_ttAddTaskGroup;
*/
params [
["_filter", {true}],
["_taskGroup", "", [""]]
];
if (isServer) then {
private _tasks = missionNamespace getVariable ["FHQ_tt_MissionTasks", []];
private _units = (if (isMultiplayer) then {playableUnits+FHQ_TTI_extraUnits} else {switchableUnits});
private _i = 0;
_units = [_filter, _units] call FHQ_fnc_ttiFilterUnits;
if (count _units == 0) exitWith {/* Nothing to be done */};
for [{_i = 0}, {_i < count _tasks}, {_i = _i + 1}] do
{
private _task = _tasks select _i;
private _group = _task select 0;
private _entry = _task select 1;
if (_taskGroup isEqualTo _group) then {
([_units] + [_entry]) call FHQ_fnc_ttAddTasks;
};
};
};
/* FHQ_fnc_ttAddTasks: Add tasks to the mission
*
* Task are defined similar to briefing entries. The function accepts an array as input.
* Each entry is either a filter (see FHQ_TT_addBriefing), or a task description.
*
* A task description itself is an array and can be one of the following format:
* [_taskName, _longDescription, _shortDescription, _waypointDescription, _target, _initialState, _type]
* [[_taskName, _parentTask], _longDescription, _shortDescription, _waypointDescription, _target, _initialState, _type]
*
* Both _target and _initialState are optional and can be left out.
*
* o _taskName is a symbolic name that is invisible to the player.
* o _longDescription is a text describing the task.
* o _shortDescription is used as a headline for the task in the task list and on task hints
* o _waypointDescription is displayed on the waypoint on the map and in the 3d view (if enabled).
* o _target can be a position (three-element array) or an object. If either is given, the
* task waypoint is shown on the map an the 3d view. Objects that move also move
* the waypoint marker.
* o _initialState is the initial state of the task ("succeeded", "failed", "canceled",
* "created", or "assigned"). By default, if _initialState is ommited, the state is set
* to "created". If set to "assigned", the task is also automatically assigned to everyone
* that knows about it.
* o _type is one of the defined task types, see the link for more information:
* https://community.bistudio.com/wiki/Arma_3_Tasks_Overhaul#Default_Task_Types:_Actions
*
* Example:
*
* [
* west,
* ["taskBoard1", "Board your chopper", "Board your chopper", "BOARD", westHelo1, "assigned"],
* ["taskCAS", "Fly around", "Fly around", "CAS"],
* ["taskRetreat1", "Return to LZ", "Return to LZ", "RETREAT", getMarkerPos "markLZ"],
* "BLU_G_F",
* ["taskSecret", "Secret: Betray NATO for whatever reason", "Secret: Betray NATO", ""],
* [["taskSecret1", "taskSecret"], "Because they are idiots", "Idiots", ""],
* [["taskSecret2", "taskSecret"], "Because I am evil", "Evil", ""]
* ] call FHQ_fnc_ttAddTasks;
*
* The first three tasks are assigned at all playable west units. The second bunch of three tasks is
* only assigned to FIA units. The latter two, taskSecret1 and taskSecret2 are created as subtasks
* of the task "taskSecret" and will be displayed immediately below their respective parent.
*
* NOTE: This function can only be called on the server. Calling it anywhere else will have no effect.
*/
private _currentFilter = {true};
if (isServer) then {
/* Note: Server only code. Briefing entries must be added on the server, not on an
* individual client
*/
private _i = 0;
for [{_i = 0}, {_i < count _this}, {_i = _i + 1}] do {
private _current = _this select _i;
if (_current call FHQ_fnc_ttiIsFilter) then {
/* Must be a filter */
_currentFilter = nil;
_currentFilter = _current;
} else {
/* Task entry.
* Check if the task already exists. If not, construct a full
* task entry with all redundant information filled in for easier
* access later on
*/
private _name = _current call FHQ_fnc_ttiGetTaskName;
if (([FHQ_TTI_TaskList, _name] call FHQ_fnc_ttiTaskExists) == -1) then {
private _newTask =
[_current call FHQ_fnc_ttiGetTaskId,
_current call FHQ_fnc_ttiGetTaskDesc,
_current call FHQ_fnc_ttiGetTaskTitle,
_current call FHQ_fnc_ttiGetTaskWp,
_current call FHQ_fnc_ttiGetTaskTarget,
_current call FHQ_fnc_ttiGetTaskState,
_current call FHQ_fnc_ttiGetTaskType];
FHQ_TTI_TaskList = FHQ_TTI_TaskList + [[_currentFilter, _newTask]];
};
};
};
publicVariable "FHQ_TTI_TaskList";
if (!isDedicated) then {
FHQ_TTI_TaskList call FHQ_fnc_ttiUpdateTaskList;
};
FHQ_TTI_tasks = true;
publicVariable "FHQ_TTI_tasks";
};
/* FHQ_fnc_ttAreTasksCompleted
*
* Check for all tasks given whether they are considered completed. This function can
* be called on the client as well as the server.
*
* Usage
* _result = [_taskName1, _taskName2, ...] call FHQ_fnc_ttAreTasksCompleted
*
* _taskName1 and following: Task names that are tested for being completed. If any of them is not
* completed, the function returns false, else true.
*/
private ["_result", "_x"];
_result = true;
{
if (!(tolower ([_x] call FHQ_fnc_ttGetTaskState) in ["succeeded", "canceled", "failed"])) exitWith
{
_result = false;
};
} forEach _this;
_result;
/* FHQ_fnc_ttAreTasksSuccessful
*
* Check success for all tasks given. This function can be called on the client as well as
* the server.
*
* _result = [_taskName1, _taskName2, ...] call FHQ_fnc_ttAreTasksSuccessful
*/
private ["_result", "_x"];
_result = true;
{
if (tolower ([_x] call FHQ_fnc_ttGetTaskState) != "succeeded") exitWith
{
_result = false;
};
} forEach _this;
_result;
/* FHQ_fnc_ttGetAllTasksWithState
*
* Get all tasks with a given state. This function can be called on the client as well as
* the server.
*
* _taskList = [_state] call FHQ_fnc_ttGetAllTasksWithState;
*/
#define FHQ_TTIF_TASKSTATE 5
private ["_result", "_taskState"];
_result = [];
_taskState = [_this, 0, "", [""]] call BIS_fnc_param;
{
if (((_x select 1) select FHQ_TTIF_TASKSTATE) == _taskState) then
{
_result = _result + [(_x select 1) call FHQ_fnc_ttiGetTaskName];
};
} forEach FHQ_TTI_TaskList;
_result;
/* FHQ_fnc_ttGetTaskState
*
* Get the state of a given task. This function can be called on the client as well as
* the server.
*
* Usage:
* _state = [_task] call FHQ_fnc_ttGetTaskState;
*
* _task: The name of a task defined via FHQ_fnc_ttAddTask
*
* Returns the state of the task ("succeeded", "failed", "canceled", "created", "assigned"), or an empty
* string if the task does not exist
*/
#define FHQ_TTIF_TASKSTATE 5
private ["_res", "_name", "_idx", "_entry"];
_res = "";
_name = [_this, 0, "", [""]] call BIS_fnc_param;
_idx = [FHQ_TTI_TaskList, _name] call FHQ_fnc_ttiTaskExists;
if (_idx != -1) then {
_entry = FHQ_TTI_TaskList select _idx;
_res = (_entry select 1) select FHQ_TTIF_TASKSTATE;
};
_res;
/* Internal: Add a briefing record on the server
* parameters:
* select 0: Filter
* select 1: [_section, _subject, _text]
*/
private _record = [_this, 1] call BIS_fnc_param;
private _filter = [_this, 0] call BIS_fnc_param;
private _subject = "Diary";
private _topic = _record select 0;
private _text = _record select 1;
if (count _record == 3) then {
_subject = _record select 0;
_topic = _record select 1;
_text = _record select 2;
};
FHQ_TTI_BriefingList = FHQ_TTI_BriefingList + [[_filter, [_subject, _topic, _text]]];
/* build a condition from the conditions in the given mission flow that we
* can use for waitUntil
*/
private _cond = "";
private _i = 0;
for "_i" from 0 to (count _this - 1) do {
private _current = _this select _i;
if (_i != 0) then {
_cond = format ["%1 or", _cond];
};
_cond = format ["%1 (%2)", _cond, _current select 0];
};
_cond;private ["_current", "_existing", "_unit", "_name", "_state", "_idx", "_record", "_object", "_taskID",
"_parented", "_target"];
_current = [_this, 0] call BIS_fnc_param;
_existing = [_this, 1] call BIS_fnc_param;
_unit = [_this, 2] call BIS_fnc_param;
_name = _current call FHQ_fnc_ttiGetTaskName;
_state = _current call FHQ_fnc_ttiGetTaskState;
private _target = _current call FHQ_fnc_ttiGetTaskTarget;
private _desc = _current call FHQ_fnc_ttiGetTaskDesc;
private _title = _current call FHQ_fnc_ttiGetTaskTitle;
private _updated = false;
_parented = false;
_idx = [_existing, _name] call FHQ_fnc_ttiTaskExists;
if (_idx != -1) then {
/* Update existing task */
_record = _existing select _idx;
if ((_record select 0) != _state) then {
/* Need to set new state */
_record set [0, _state];
if (_state == "assigned") then {
_unit setCurrentTask (_record select 1);
};
(_record select 1) setTaskState _state;
if (_unit == player && !FHQ_TTI_supressTaskHints) then
{
[_current call FHQ_fnc_ttiGetTaskTitle, _state, _current call FHQ_fnc_ttiGetTaskType] call FHQ_fnc_ttTaskHint;
};
/* Update the list */
_existing set [_idx, _record];
};
if (!(_target isEqualTo (_record select 3))) then {
private _target = _current call FHQ_fnc_ttiGetTaskTarget;
_record set [3, _target];
if (typeName _target == "ARRAY") then {
(_record select 1) setSimpleTaskDestination _target;
} else {
(_record select 1) setSimpleTaskTarget [_target, true];
};
_updated = true;
};
if (!(_desc isEqualTo (_record select 4))) then {
_record set [4, _desc];
(_record select 1) setSimpleTaskDescription [_desc, _title, _current call FHQ_fnc_ttiGetTaskWp];
_updated = true;
};
if (!(_title isEqualTo (_record select 5))) then {
_record set [5, _title];
(_record select 1) setSimpleTaskDescription [_desc, _title, _current call FHQ_fnc_ttiGetTaskWp];
_updated = true;
};
if (_unit == player && !FHQ_TTI_supressTaskHints && _updated) then {
[_current call FHQ_fnc_ttiGetTaskTitle, "update", _current call FHQ_fnc_ttiGetTaskType] call FHQ_fnc_ttTaskHint;
};
} else {
/* Create a new task */
_taskID = _current call FHQ_fnc_ttiGetTaskId;
if (typename _taskID == "STRING") then {
_object = _unit createSimpleTask [_name];
} else {
_object = _unit createSimpleTask [_name, _unit getVariable format["FHQ_TT_taskname_%1", _taskID select 1]];
_parented = true;
};
_object setSimpleTaskDescription [_current call FHQ_fnc_ttiGetTaskDesc,
_current call FHQ_fnc_ttiGetTaskTitle,
_current call FHQ_fnc_ttiGetTaskWp];
_target = _current call FHQ_fnc_ttiGetTaskTarget;
switch (typename _target) do
{
case "ARRAY": {
_object setSimpleTaskDestination _target;
};
case "OBJECT": {
_object setSimpleTaskTarget [_target, true];
};
};
private _taskType = _current call FHQ_fnc_ttiGetTaskType;
if (_taskType != "" && FHQ_TTI_version > 156) then {
[_object, _taskType] call compile "(_this select 0) setSimpleTaskType (_this select 1);"
};
if (!(_state call FHQ_fnc_ttiIsTaskState)) then {
/* Due to the way the type is handled, this can actually NOT be a state */
_state = "created";
};
_object setTaskState _state;
if (tolower(_state) == "assigned") then
{
_unit setCurrentTask _object;
};
_unit setVariable [format["FHQ_TT_taskname_%1", _name], _object]; // FIXME: propagate through network ?
if (_unit == player && !FHQ_TTI_supressTaskHints) then
{
[_current call FHQ_fnc_ttiGetTaskTitle, _state, _current call FHQ_fnc_ttiGetTaskType] call FHQ_fnc_ttTaskHint;
};
_existing = _existing + [ [_state, _object, _name, _target, _current call FHQ_fnc_ttiGetTaskDesc, _current call FHQ_fnc_ttiGetTaskTitle, _current call FHQ_fnc_ttiGetTaskWp] ];
_target = nil;
};
_existing;/* Internal function */
private ["_unitsArray", "_outputArray"];
_filter = [_this, 0] call BIS_fnc_param;
_unitsArray = [_this, 1, (if (isMultiplayer) then {playableUnits+FHQ_TTI_extraUnits} else {switchableUnits})] call BIS_fnc_param;
_outputArray = [];
switch (typename _filter) do
{
case "CODE":
{
// Filter all playable units by comparing them with the code
{if (_x call _filter) then {_outputArray = _outputArray + [_x];};} forEach _unitsArray;
};
case "GROUP":
{
// Filter out all objects not in group
{if (_x in units _filter) then {_outputArray = _outputArray + [_x];};} forEach _unitsArray;
};
case "OBJECT":
{
// Result is only the array containing the object
_outputArray = [_filter];
};
case "SIDE":
{
// Filter out all objects not belonging to side
{if (side _x == _filter) then {_outputArray = _outputArray + [_x];};} forEach _unitsArray;
};
case "STRING":
{
// Filer out all objects not belonging to the faction
{if (faction _x == _filter) then {_outputArray = _outputArray + [_x];};} forEach _unitsArray;
};
case "ARRAY":
{
// Result is the input
_outputArray = _filter;
}
};
_outputArray;
#define FHQ_TTIF_TASKNAME 0
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKWP 3
#define FHQ_TTIF_TASKTARGET 4
#define FHQ_TTIF_TASKSTATE 5
_res = _this select FHQ_TTIF_TASKDESC;
_res;#define FHQ_TTIF_TASKNAME 0
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKWP 3
#define FHQ_TTIF_TASKTARGET 4
#define FHQ_TTIF_TASKSTATE 5
_res = _this select FHQ_TTIF_TASKNAME;
_res;#define FHQ_TTIF_TASKNAME 0
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKWP 3
#define FHQ_TTIF_TASKTARGET 4
#define FHQ_TTIF_TASKSTATE 5
private _name = "";
private _task = _this select FHQ_TTIF_TASKNAME;
if (typename _task == "ARRAY") then
{
_name = _task select 0;
}
else
{
_name = _task;
};
_name;#define FHQ_TTIF_TASKNAME 0
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKWP 3
#define FHQ_TTIF_TASKTARGET 4
#define FHQ_TTIF_TASKSTATE 5
/* Might not be present */
private _res = "created";
if (count _this > FHQ_TTIF_TASKSTATE) then {
if ((_this select FHQ_TTIF_TASKSTATE) call FHQ_fnc_ttiIsTaskState) then {
_res = _this select FHQ_TTIF_TASKSTATE;
} else {
_res = "created";
};
} else {
if (count _this > FHQ_TTIF_TASKTARGET) then {
if (typename (_this select FHQ_TTIF_TASKTARGET) == "STRING") then {
if ((_this select FHQ_TTIF_TASKTARGET) call FHQ_fnc_ttiIsTaskState) then {
_res = _this select FHQ_TTIF_TASKTARGET;
} else {
_res = "created";
};
};
};
};
_res;#define FHQ_TTIF_TASKNAME 0
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKWP 3
#define FHQ_TTIF_TASKTARGET 4
#define FHQ_TTIF_TASKSTATE 5
/* Might not be present */
private _res = "";
if (count _this > FHQ_TTIF_TASKTARGET) then {
_thing = _this select FHQ_TTIF_TASKTARGET;
/* A string means it's the initial state (unless starting with # or @), so if it's not, it's either
* a position (array) or target (object)
*/
switch (typename _thing) do {
case "ARRAY": {
_res = nil;
_res = _thing;
};
case "OBJECT": {
_res = nil;
_res = _thing;
};
case "CODE": {
_res = nil;
_res = call _thing;
};
case "STRING": {
_res = nil;
if (_thing find "#" == 0) exitWith {
private _parts = _thing select [1];
_res = call compile _parts ;
};
if (_thing find "@" == 0) exitWith {
private _parts = _thing select [1];
_res = getMarkerPos _parts;
};
_res = "";
};
};
};
_res;
#define FHQ_TTIF_TASKNAME 0
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKWP 3
#define FHQ_TTIF_TASKTARGET 4
#define FHQ_TTIF_TASKSTATE 5
_res = _this select FHQ_TTIF_TASKTITLE;
_res;#define FHQ_TTIF_TASKNAME 0
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKWP 3
#define FHQ_TTIF_TASKTARGET 4
#define FHQ_TTIF_TASKSTATE 5
#define FHQ_TTIF_TASKTYPE 6
/* Might not be present */
private _res = "";
private _num = count _this;
/* It must be a string, and it must be the last one, so we're just checking if there's more than 4
* and the last one is a string that is not a target or a state
*/
if (_num > 4) then {
private _type = _this select (_num - 1);
if (typename _type == "STRING") then {
if (!(_type call FHQ_fnc_ttiIsTaskState) and (_type find "#" != 0) and (_type find "@" != 0)) then {
/* Last element is a string, but no position, and no state, so it must be a type */
_res = _type;
};
};
};
_res;#define FHQ_TTIF_TASKNAME 0
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKWP 3
#define FHQ_TTIF_TASKTARGET 4
#define FHQ_TTIF_TASKSTATE 5
_res = _this select FHQ_TTIF_TASKWP;
_res;private ["_x", "_res", "_test", "_inArray"];
_res = false;
_inArray = [_this, 1, []] call BIS_fnc_param;
_test = [_this, 0, []] call BIS_fnc_param;
{
if (_x select 0 == _inArray select 0 && ((_x select 1) select 0) == ((_inArray select 1) select 0)
&& ((_x select 1) select 1) == ((_inArray select 1) select 1)) exitWith {
_res = true;
};
} foreach _test;
_res; /* Internal function, called automatically */
FHQ_TT_subtaskPrefix = " > ";
FHQ_TTI_supressTaskHints = true;
FHQ_TTI_version = productVersion select 2;
FHQ_TTI_DoSpectator = true;
if (isServer) then
{
FHQ_TTI_BriefingList = [];
FHQ_TTI_TaskList = [];
};
if (!isDedicated) then
{
FHQ_TTI_ClientTaskList = [];
if (isNil {player} || isNull player) then
{
FHQ_TTI_isJIPPlayer = true;
};
[] spawn
{
// Wait for join in progress
waitUntil {!isNil {player}};
waitUntil {!isNull player};
waitUntil {!isNil "FHQ_TTI_PostInitDone"};
/* Wait until briefing is ready (on server).
* Note that we spawn this code, to cope with the possibility of having no briefing at all
*/
[] spawn {
waitUntil {!isNil "FHQ_TTI_briefing"};
FHQ_TTI_BriefingList call FHQ_fnc_ttiUpdateBriefingList;
"FHQ_TTI_BriefingList" addPublicVariableEventHandler {(_this select 1) call FHQ_fnc_ttiUpdateBriefingList};
};
// Wait until the task list is ready (on server)
waitUntil {!isNil "FHQ_TTI_tasks"};
FHQ_TTI_TaskList call FHQ_fnc_ttiUpdateTaskList;
"FHQ_TTI_TaskList" addPublicVariableEventHandler {(_this select 1) call FHQ_fnc_ttiUpdateTaskList};
FHQ_TTI_supressTaskHints = false;
};
};
/* Internal function */
private "_x";
private _filter = _this;
private _res = false;
switch (typename _filter) do
{
case "CODE":
{
_res = true;
};
case "GROUP":
{
_res = true;
};
case "OBJECT":
{
_res = true;
};
case "SIDE":
{
_res = true;
};
case "STRING":
{
_res = true;
};
case "ARRAY":
{
/* The complex case: If all elements are objects, then it's a filter */
private _nonObjects = 0;
{
if (typename _x != "OBJECT") then {
_nonObjects = _nonObjects + 1;
};
} foreach _filter;
if (_nonObjects == 0) then {
_res = true;
};
};
};
_res;/* Internal Function */
private _state = toLower _this;
private _res = false;
if (_state in ["succeeded", "failed", "canceled", "created", "assigned"]) then {
_res = true;
};
_res;/* Eden compatible mission briefing
* This function is called like
* [_value] call FHQ_fnc_ttiMissionBriefing;
*
* _value is an array of briefing blocks. Each block is an array in itself,
* with the following format:
* ["identifier", [ [FHQ_TT briefing entry],... ]]
*
* "identifier" is a string identifying a "block" of entries. Units can receive one
* such block, i.e. all briefing entries listed under the identifier will be given to
* the unit.
*/
missionNamespace setVariable ["FHQ_tt_MissionBriefing", param [0, []]]; /* Eden compatible mission tasks
* This function is called like
* [_value] call FHQ_fnc_ttiMissionTasks;
*
* _value is an array of tasks. Each entry is an identifier followed by
* a full FHQ TT task entry
*
*/
missionNamespace setVariable ["FHQ_tt_MissionTasks", param [0, []]]; /* PostInit function
* This function walks through all playable/switchable units and assigns tasks and briefings to them
*/
/* Briefings:
* FHQ_tt_MissionBriefing is a global variable that contains an array of briefing blocks.
* Each block has a unique ID and a list of entries.
*
* We process this by going through the briefing blocks first: For each entry, the units
* referencing the briefing are collected in an array, and
*/
if (!isServer) exitWith {};
FHQ_TTI_extraUnits = allMissionObjects "VirtualCurator_F"+allMissionObjects "VirtualSpectator_F";
FHQ_TTI_PostInitDone = true;
publicVariable "FHQ_TTI_extraUnits";
publicVariable "FHQ_TTI_PostInitDone";
private _briefings = missionNamespace getVariable ["FHQ_tt_MissionBriefing", []];
private _tasks = missionNamespace getVariable ["FHQ_tt_MissionTasks", []];
private _playable = (if (isMultiplayer) then {playableUnits+FHQ_TTI_extraUnits} else {switchableUnits});
private _i = 0;
for [{_i = 0}, {_i < count _briefings}, {_i = _i + 1}] do
{
private _briefing = _briefings select _i;
private _id = _briefing select 0;
private _entry = _briefing select 1;
private _units = [];
{
if (tolower(_id) == tolower(_x getVariable ["FHQ_tt_UnitBriefing", ""])) then {
_units = _units + [_x];
};
} foreach _playable;
if (count _units != 0) then {
([_units] + _entry) call FHQ_fnc_ttAddBriefing;
};
};
for [{_i = 0}, {_i < count _tasks}, {_i = _i + 1}] do
{
private _task = _tasks select _i;
private _id = _task select 0;
private _entry = _task select 1;
private _units = [];
{
if (_id in (_x getVariable ["FHQ_tt_UnitTasks", []])) then {
_units = _units + [_x];
};
} foreach _playable;
if (count _units != 0) then {
([_units] + [_entry]) call FHQ_fnc_ttAddTasks;
};
};
/* FHQ_fnc_ttIsTaskCompleted
*
* Check whether a task is canceled, successful or failed. Like all query functions, this can be called
* on any client as well as the server.
*
* _result = [_task] call FHQ_fnc_ttIsTaskCompleted;
*
* _task: Name of the task.
*
* Returns true or false if the task's state is considered a "completed" state, i.e.
* succeeded, canceled, or failed
*
*/
private "_result";
_result = (tolower(_this call FHQ_fnc_ttGetTaskState) in ["succeeded", "canceled", "failed"]);
_result;
/* FHQ_fnc_ttIsTaskSuccessful
*
* Check whether a task is ended successfully. This function can be called on the client as well as
* the server.
*
* _result = [_taskName] call FHQ_fnc_ttIsTaskSuccessful;
*/
private "_result";
_result = (tolower(_this call FHQ_fnc_ttGetTaskState) == "succeeded");
_result;
private ["_unitTaskList", "_name", "_res", "_current", "_i", "_checkName"];
_unitTaskList = [_this, 0] call BIS_fnc_param;
_name = [_this, 1] call BIS_fnc_param;
_res = -1;
for "_i" from 0 to count _unitTaskList - 1 do
{
_current = _unitTaskList select _i;
if (count _current == 2) then {
_checkName = (_current select 1) call FHQ_fnc_ttiGetTaskName; // Server list
} else {
_checkName = (_current select 2); // Client list
};
if (_checkName == _name) exitWith {
_res = _i;
};
} foreach _unitTaskList;
_res;/* Eden compatible mission briefing
* This function is called like
* [_unit, _value] call FHQ_fnc_ttiUnitBriefing;
*
* _unit is the unit that should receive the briefing, and _value
* denotes the briefing itself.
*/
private _unit = param [0, objNull];
private _value = param [1, ""];
_unit setVariable ["FHQ_tt_UnitBriefing", _value];/* Eden compatible mission tasks
* This function is called like
* [_unit, _value] call FHQ_fnc_ttiUnitTasks;
*
* _unit is the unit that should receive the briefing, and _value
* denotes the briefing itself.
*/
private _unit = param [0, objNull];
private _value = param [1, ""];
_unit setVariable ["FHQ_tt_UnitTasks", _value];private ["_i", "_idx", "_current", "_record", "_filter", "_units", "_x", "_briefing", "_list", "_existing", "_notify"];
_briefing = _this;
_notify = false;
{
_list = [];
for [{_i = 0}, {_i < count _briefing}, {_i = _i + 1}] do {
_current = _briefing select _i; // [_filter, [_section, _subject, _text]]
_filter = _current select 0;
_units = [_filter] call FHQ_fnc_ttiFilterUnits;
if (_x in _units) then {
_record = _current select 1;
_list = _list + [[_record select 0, [_record select 1, _record select 2]]];
};
};
/* Now add them in reverse order */
_existing = _x getVariable ["FHQ_TTI_ClientBriefingList", []];
for [{_i = count _list - 1}, {_i >= 0}, {_i = _i - 1}] do {
_current = _list select _i;
if (!([_existing, _current] call FHQ_fnc_ttiHasBriefingEntry)) then {
/* Check if the section exists and create it if necessary, then add the record */
if (!(_x diarySubjectExists (_current select 0))) then {
_x createDiarySubject [_current select 0, _current select 0];
};
_x createDiaryRecord [_current select 0, [(_current select 1) select 0, (_current select 1) select 1]];
if (player == _x && !FHQ_TTI_supressTaskHints) then
{
private "_title";
_title = _current select 0;
if (_title == "Diary") then {
_title = "Briefing";
};
[format ["%1/%2", _title, (_current select 1) select 0], "newbriefing"] call FHQ_fnc_ttTaskHint;
};
};
};
_x setVariable ["FHQ_TTI_ClientBriefingList", _list]; // FIXME ?
} foreach (if (isMultiplayer) then {playableUnits+FHQ_TTI_extraUnits} else {switchableUnits});private _tasks = _this;
private _i = 0;
{
private _list = [];
for [{_i = 0}, {_i < count _tasks}, {_i = _i + 1}] do {
private _current = _tasks select _i; // [_filter, [_section, _subject, _text]]
private _filter = _current select 0;
private _units = [_filter] call FHQ_fnc_ttiFilterUnits;
if (_x in _units) then {
//_list = _list + [_current select 1];
_list pushBack (_current select 1);
};
};
/* Now add them in reverse order */
private _existing = _x getVariable ["FHQ_TTI_ClientTaskList", []];
for [{_i = 0}, {_i < count _list}, {_i = _i + 1}] do {
private _current = _list select _i;
_existing = [_current, _existing, _x] call FHQ_fnc_ttiCreateOrUpdateTask;
};
_x setVariable ["FHQ_TTI_ClientTaskList", _existing];
} foreach (if (isMultiplayer) then {playableUnits+FHQ_TTI_extraUnits} else {switchableUnits});/*
* Control mission flow based on an array of conditions and actions.
*
* Mission flow through FSMs is a good possibility for ensuring a single point of execution for
* any events happening during the game session. Most of the time, though, the FSM is following
* a very rigid structure: A single "on mission" state branching out into a bunch of conditions
* that in term lead to code executed and then return to the on mission state.
*
* This can be collapsed into the conditions and the code executed when the condition is met.
* This function does exactly that: It runs in a thread on the server only, waiting for
* any of the conditions to become true, then execute the code associated to that condition.
* Each condition/code pair can be attributed with a set of attributes that determine what happens
* afterwards. For example, the "single" attribute means that the condition can happen exactly once
* and will be removed after it happened. This prevents, for example, that a condition is executed
* every frame from then on out.
*
* The function is called like this:
* _result = [_flow] call FHQ_fnc_missionFlow;
*
* NOTE: It must be called in a scheduled environment. If in doubt, spawn a thread.
*
* Parameters:
* _flow: An array describing the actual flow of the mission. Each entry consists of three elements:
* - Condition string (will be compiled and must evaluate to a boolean)
* - Code to be executed when the condition is met.
* - Array of strings that define attributes for the condition/action pair. Currently, the following
* attributes are defined. Unknown items are ignored:
* "single" - This action should only be executed once. The condition/action pair is removed from the
* mission flow array after it has been executed once. Note: If the array is omitted, "single"
* is assumed
* "end" - This action ends the mission. If an "end" attribute is encountered, FHQ_fnc_missionFlow
* will exit.
*
* Return value:
* _result: If an "end" action is found, the attribute array corresponding to this action is returned. This
* allows the user to check the attributes of the ending action.
*
* Example:
* private _flow = [
* ["!alive blowMeUp", {systemChat "BlowMeUp is no more";}, ["single"]],
* ["triggerActivated exfilTrigger", {systemChat "Thats it, end mission";}, ["end", "success"]]
* ];
*
* private _result = [_flow] call FHQ_fnc_missionFlow;
* if ("success" in _result) then {
* systemChat "The mission was a success";
* };
*/
private _result = [];
if (isServer) then {
private _running = true;
params [
["_flow", []]
];
while {_running} do {
/* Create the condition to wait for */
private _cond = _flow call FHQ_fnc_ttiBuildCondition;
/* And wait until one of them happens */
waitUntil {call compile _cond};
/* Find out which */
_deleteMes = [];
{
private "_attribX";
private _condX = _x select 0;
private _codeX = _x select 1;
if (count _x >= 3) then {
_attribX = _x select 2;
} else {
_attribX = ["single"];
};
if (call compile _condX) then {
/* ok, this one's triggered, execute the code */
if (typename _codeX == "CODE") then {
call _codeX;
};
if (typename _codeX == "STRING") then {
[_codeX, "succeeded"] call FHQ_fnc_ttSetTaskState;
};
if ("single" in _attribX) then {
_deleteMes pushBack _forEachIndex;
};
if ("end" in _attribX) exitWith {
_running = false;
_result = +_attribX;
};
};
} foreach _flow;
{
_flow deleteAt _x;
} forEach _deleteMes;
};
};
_result/* FHQ_fnc_ttSetTaskDescription
*
* Set the "long" description of the specified task, and alert the player if necessary.
*
* NOTE: Server callable only. Calling this on a client does not have an effect
*
* Usage:
* [_task, _newDesc] call FHQ_fnc_ttSetTaskDescription;
* _task: the task name defined with FHQ_fnc_ttAddTasks
* _newDesc: New description
*
*/
#define FHQ_TTIF_TASKDESC 1
private ["_name", "_desc", "_idx", "_record", "_entry"];
if (isServer) then {
_name = [_this, 0, "", [""]] call BIS_fnc_param;
_desc = [_this, 1, "", [""]] call BIS_fnc_param;
_idx = [FHQ_TTI_TaskList, _name] call FHQ_fnc_ttiTaskExists;
if (_idx != -1) then {
_entry = FHQ_TTI_TaskList select _idx;
_record = _entry select 1;
_record set [FHQ_TTIF_TASKDESC, _desc];
_entry set [1, _record];
FHQ_TTI_TaskList set [_idx, _entry];
publicVariable "FHQ_TTI_TaskList";
if (!isDedicated) then {
FHQ_TTI_TaskList call FHQ_fnc_ttiUpdateTaskList;
};
};
};/* FHQ_fnc_ttSetTaskState
*
* Set the state of the specified task to the specified state, and alert the player
* if necessary.
*
* NOTE: Server callable only. Calling this on a client does not have an effect
*
* Usage:
* [_task, _state] call FHQ_fnc_ttSetTaskState;
* _task: the task name defined with FHQ_fnc_ttAddTasks
* _state: One of "succeeded", "failed", "canceled", "created", "assigned"
*
*/
#define FHQ_TTIF_TASKSTATE 5
private ["_name", "_state", "_idx", "_record", "_entry"];
if (isServer) then {
_name = [_this, 0, "", [""]] call BIS_fnc_param;
_state = [_this, 1, "", [""]] call BIS_fnc_param;
_idx = [FHQ_TTI_TaskList, _name] call FHQ_fnc_ttiTaskExists;
if (_idx != -1) then {
_entry = FHQ_TTI_TaskList select _idx;
_record = _entry select 1;
_record set [FHQ_TTIF_TASKSTATE, _state];
_entry set [1, _record];
FHQ_TTI_TaskList set [_idx, _entry];
publicVariable "FHQ_TTI_TaskList";
if (!isDedicated) then {
FHQ_TTI_TaskList call FHQ_fnc_ttiUpdateTaskList;
};
};
};
/* FHQ_fnc_ttSetTaskStateAndNext
*
* Set the state of a given task to the given state, and select another task from a list of
* tasks which is not finished yet. The first task found will be set to assigned and a message will
* be shown to the player, if enabled.
*
* NOTE: Can only be called on the server
*
* Usage:
* [_task1, _state, _task2, ...] call FHQ_fnc_ttSetTaskStateAndNext;
*
* _task1: The task to set to _state
* _state: The state for _task1
* _task2 and following: The tasks are checked in turn for completion, and the first one not
* completed will be assigned.
*
* Example:
*
* ["taskGetVodka", "succeeded", "taskDrink", "taskBeMerry"] call FHQ_fnc_ttSetTaskStateAndNext;
*/
private "_i";
[_this select 0, _this select 1] call FHQ_fnc_ttSetTaskState;
for [ {_i = 2}, {_i < count _this}, {_i = _i + 1} ] do
{
if (!([_this select _i] call FHQ_fnc_ttIsTaskCompleted)) exitWith
{
[_this select _i, "assigned"] call FHQ_fnc_ttSetTaskState;
};
};
/* FHQ_fnc_ttSetTaskTarget
*
* Set the target of the specified task, and alert the player if necessary.
*
* NOTE: Server callable only. Calling this on a client does not have an effect
*
* Usage:
* [_task, _newTarget] call FHQ_fnc_ttSetTaskTarget;
* _task: the task name defined with FHQ_fnc_ttAddTasks
* _newTarget: The new target, can be an array (position) or an object
*
*/
#define FHQ_TTIF_TASKTARGET 4
private ["_name", "_target", "_idx", "_record", "_entry"];
if (isServer) then {
_name = [_this, 0, "", [""]] call BIS_fnc_param;
_target = [_this, 1, objNull, [objNull, [2,3]]] call BIS_fnc_param;
_idx = [FHQ_TTI_TaskList, _name] call FHQ_fnc_ttiTaskExists;
if (_idx != -1) then {
_entry = FHQ_TTI_TaskList select _idx;
_record = _entry select 1;
_record set [FHQ_TTIF_TASKTARGET, _target];
_entry set [1, _record];
FHQ_TTI_TaskList set [_idx, _entry];
publicVariable "FHQ_TTI_TaskList";
if (!isDedicated) then {
FHQ_TTI_TaskList call FHQ_fnc_ttiUpdateTaskList;
};
};
};/* FHQ_fnc_ttSetTaskTitlesAndTarget
*
* Set the title and description of the specified task, and alert the player if necessary.
*
* NOTE: Server callable only. Calling this on a client does not have an effect
*
* Usage:
* [_task,_newTarget, _newTitle, _newDesc] call FHQ_fnc_ttSetTaskTitle;
* _task: the task name defined with FHQ_fnc_ttAddTasks
* _newTitle: The new title
* _newDescription: The new description
*/
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
#define FHQ_TTIF_TASKTARGET 4
private ["_name", "_title", "_desc", "_idx", "_record", "_entry", "_target"];
if (isServer) then {
_name = [_this, 0, "", [""]] call BIS_fnc_param;
_target = [_this, 1, objNull, [objNull, [2,3]]] call BIS_fnc_param;
_title = [_this, 2, "", [""]] call BIS_fnc_param;
_desc = [_this, 3, "", [""]] call BIS_fnc_param;
_idx = [FHQ_TTI_TaskList, _name] call FHQ_fnc_ttiTaskExists;
if (_idx != -1) then {
_entry = FHQ_TTI_TaskList select _idx;
_record = _entry select 1;
_record set [FHQ_TTIF_TASKTITLE, _title];
_record set [FHQ_TTIF_TASKDESC, _desc];
_record set [FHQ_TTIF_TASKTARGET, _target];
_entry set [1, _record];
FHQ_TTI_TaskList set [_idx, _entry];
publicVariable "FHQ_TTI_TaskList";
if (!isDedicated) then {
FHQ_TTI_TaskList call FHQ_fnc_ttiUpdateTaskList;
};
};
};/* FHQ_fnc_ttSetTaskTitle
*
* Set the "short" description of the specified task, and alert the player if necessary.
*
* NOTE: Server callable only. Calling this on a client does not have an effect
*
* Usage:
* [_task, _newTitle] call FHQ_fnc_ttSetTaskTitle;
* _task: the task name defined with FHQ_fnc_ttAddTasks
* _newTitle: The new title
*
*/
#define FHQ_TTIF_TASKTITLE 2
private ["_name", "_title", "_idx", "_record", "_entry"];
if (isServer) then {
_name = [_this, 0, "", [""]] call BIS_fnc_param;
_title = [_this, 1, "", [""]] call BIS_fnc_param;
_idx = [FHQ_TTI_TaskList, _name] call FHQ_fnc_ttiTaskExists;
if (_idx != -1) then {
_entry = FHQ_TTI_TaskList select _idx;
_record = _entry select 1;
_record set [FHQ_TTIF_TASKTITLE, _title];
_entry set [1, _record];
FHQ_TTI_TaskList set [_idx, _entry];
publicVariable "FHQ_TTI_TaskList";
if (!isDedicated) then {
FHQ_TTI_TaskList call FHQ_fnc_ttiUpdateTaskList;
};
};
};/* FHQ_fnc_ttSetTaskTitles
*
* Set the title and description of the specified task, and alert the player if necessary.
*
* NOTE: Server callable only. Calling this on a client does not have an effect
*
* Usage:
* [_task, _newTitle, _newDesc] call FHQ_fnc_ttSetTaskTitle;
* _task: the task name defined with FHQ_fnc_ttAddTasks
* _newTitle: The new title
* _newDescription: The new description
*/
#define FHQ_TTIF_TASKDESC 1
#define FHQ_TTIF_TASKTITLE 2
private ["_name", "_title", "_desc", "_idx", "_record", "_entry"];
if (isServer) then {
_name = [_this, 0, "", [""]] call BIS_fnc_param;
_title = [_this, 1, "", [""]] call BIS_fnc_param;
_desc = [_this, 2, "", [""]] call BIS_fnc_param;
_idx = [FHQ_TTI_TaskList, _name] call FHQ_fnc_ttiTaskExists;
if (_idx != -1) then {
_entry = FHQ_TTI_TaskList select _idx;
_record = _entry select 1;
_record set [FHQ_TTIF_TASKTITLE, _title];
_record set [FHQ_TTIF_TASKDESC, _desc];
_entry set [1, _record];
FHQ_TTI_TaskList set [_idx, _entry];
publicVariable "FHQ_TTI_TaskList";
if (!isDedicated) then {
FHQ_TTI_TaskList call FHQ_fnc_ttiUpdateTaskList;
};
};
}; /* Arma 3 */
private ["_notifyTemplate", "_desc", "_state"];
_desc = [_this, 0, ""] call BIS_fnc_param;
_state = [_this, 1, "created"] call BIS_fnc_param;
private _type = [_this, 2, ""] call BIS_fnc_param;
_notifyTemplate = "TaskCreated";
switch (tolower _state) do
{
case "created":
{
_notifyTemplate = "TaskCreated";
};
case "assigned":
{
_notifyTemplate = "TaskAssigned";
};
case "succeeded":
{
_notifyTemplate = "TaskSucceeded";
};
case "canceled":
{
_notifyTemplate = "TaskCanceled";
};
case "cancelled":
{
_notifyTemplate = "TaskCanceled";
};
case "failed":
{
_notifyTemplate = "TaskFailed";
};
case "newbriefing":
{
_notifyTemplate = "TaskAssigned";
if (isClass (missionConfigFile >> "CfgNotifications" >> "NewBriefing")) then {
_notifyTemplate = "NewBriefing";
};
};
case "update":
{
_notifyTemplate = "TaskUpdated";
};
};
if (count _type != 0) then {
_notifyTemplate = _notifyTemplate + "Icon";
if (isClass (missionConfigFile >> "CfgTaskTypes" >> _type)) then {
_type = getText (missionConfigFile >> "CfgTaskTypes" >> _type >> "icon");
} else {
_type = getText(configFile >> "CfgTaskTypes" >> _type >> "icon");
};
};
[_notifyTemplate, [_type, _desc]] call BIS_fnc_showNotification;#define INTERNAL_FUNCTION(x) \
class x \
{ \
description = "Internal Function"; \
};
#define EXPORTED_FUNCTION(x,y) \
class x \
{ \
description = y; \
};
class Effect {
tag="FHQ";
file="functions\fhq_weatherEffect";
EXPORTED_FUNCTION(weatherEffect, "Weather effects like snow and fog")
EXPORTED_FUNCTION(setWeatherEffect, "Update parameters of weather effects")
};/* Update an aspect of the weather effect
*
* Parameters:
* param [0] - fsm (from FHQ_fnc_weatherEffect)
* param [1] - Name (Snow, Fog, Sand, snowInterval, fogInterval, sandInterval)
* param [2] - depends on param [1]
*
* Example: Cancel snow
* [_fsm, "Snow", {false}] call FHQ_fnc_setWeatherEffect;
*
*/
/* Note: Variables are global, so _fsm is actually ignored. Reserved for future use */
private _name = param [1];
private _param = param [2, 0, [{true}, 0, []]];
if ((tolower _name) in ["snow", "fog", "sand"]) then {
_param call compile format ["FHQ_handle%1 = _this;", _name];
};
if ((tolower _name) == "snowInterval") then {
waitUntil {!isNil "FHQ_Snow"};
FHQ_Snow setDropInterval _param;
};
if ((tolower _name) == "fogInterval") then {
waitUntil {!isNil "FHQ_GrndFog"};
FHQ_GrndFog setDropInterval _param;
};
if ((tolower _name) == "fogSize") then {
waitUntil {!isNil "FHQ_GrndFog"};
FHQ_FogParamArray set [11, _param];
FHQ_GrndFog setParticleParams FHQ_FogParamArray;
};
if ((tolower _name) == "sandInterval") then {
waitUntil {!isNil "FHQ_Sand"};
FHQ_Sand setDropInterval _param;
};
if ((tolower _name) == "sandSize") then {
waitUntil {!isNil "FHQ_Sand"};
FHQ_SandParamArray set [11, _param];
FHQ_Sand setParticleParams FHQ_SandParamArray;
};
/*
[
["\A3\data_f\cl_basic.p3d", 1, 0, 1],
"",
"Billboard",
1,
10,
[0, 0, 0],
wind,
1,
1.275,
1,
0,
[4],
[ [1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0], [1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0.04], [1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0.02] ],
[1000],
[["\A3\data_f\cl_basic.p3d", 1, 0, 1], "",
"Billboard",
1,
10,
[0, 0, 0],
wind,
1, 1.275, 1, 0,
[4],
[
[1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0],
[1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0.04],
[1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0.02]
],
[1000], 1, 0, "", "", ""];
1,
0,
"",
"",
""];
*//* Create the weather effect fsm.
* This function must be called on each client. The parameter array is automatically
* passed on to the FSM.
*
* Parameters:
* param [0] - Object that the particle system will be attached to,
* objNull for camera
*
* param [1] - List of effects and their selectors
*
*
* Selectors work like this:
* Each entry in the effect list is an array of ["name", {code}].
* Name is either snow, fog, sand, wind.
* Code is the code that evaluates whether the effect is shown or not. Must return
* true or false. If always shown, code should be {true}
*
* Returns:
* The FSM handle
*
* Example: Let it snow, let it snow, let it snow
*
* [
* objNull,
* [["snow", {true}]]
* ] call FHQ_fnc_weatherEffect;
*
*/
if (isNil "FHQ_EffectsFSM") then {
FHQ_EffectsFSM = _this execFSM "functions\weatherEffects.fsm";
};
FHQ_EffectsFSM;class TAW_VD {
tag = "TAWVD";
class Initialize {
file = "functions\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 {};
};
};/* 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 parsingNamespace setVariable
#define GVAR_MNS missionNamespace getVariable
#define GVAR_UINS uiNamespace getVariable
#define GVAR_PNS parsingNamespace 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#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;#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;
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;
#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;#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)];
};
/*
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;};
};#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];
};#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"];
};
};/*%FSM*/
/*%FSM*/
/*
item0[] = {"init",0,4346,-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,218,-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,286.974182,-497.663422,1404,911,1};
window[] = {2,-1,-1,-32000,-32000,785,25,1465,25,3,1422};
*//*%FSM*/
class FSM
{
fsmName = "TAW_VD State Tracker";
class States
{
/*%FSM*/
class init
{
name = "init";
init = /*%FSM*/"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
"_actionID = player addAction[""Settings"",TAWVD_fnc_openMenu,[],-99,false,false,"""",''];"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class true
{
priority = 0.000000;
to="I_am_a_loop__";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"true"/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class I_am_a_loop__
{
name = "I_am_a_loop__";
init = /*%FSM*/""/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class State_changed
{
priority = 0.000000;
to="Update_me";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"(vehicle player != _playerState OR (UAVControl getConnectedUAV player select 1) != _droneState)"/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
/*%FSM*/
class Dead_Player
{
priority = 0.000000;
to="I_am_dead_Set_my";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"!alive player"/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class I_am_dead_Set_my
{
name = "I_am_dead_Set_my";
init = /*%FSM*/"_corpse = player;" \n
"_corpse removeAction _actionID;"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class Alive_player
{
priority = 0.000000;
to="Re_add_my_action";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"alive player"/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class Re_add_my_action
{
name = "Re_add_my_action";
init = /*%FSM*/"_actionID = player addAction[""Settings"",TAWVD_fnc_openMenu,[],-99,false,false,"""",''];"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class true
{
priority = 0.000000;
to="I_am_a_loop__";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"true"/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class Update_me
{
name = "Update_me";
init = /*%FSM*/"[] call TAWVD_fnc_updateViewDistance;" \n
"_playerState = vehicle player;" \n
"_droneState = UAVControl (getConnectedUAV player) select 1;"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class true
{
priority = 0.000000;
to="I_am_a_loop__";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"true"/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
};
initState="init";
finalStates[] =
{
};
};
/*%FSM*/#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"): {
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;
};#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);
};
};
};
};
};
};
};/*%FSM*/
/*%FSM*/
/*
item0[] = {"Start",0,250,-900.000000,-1790.000000,-800.000000,-1740.000000,0.000000,"Start"};
item1[] = {"_",8,218,-860.000000,-1725.000000,-840.000000,-1715.000000,0.000000,""};
item2[] = {"no_display",4,218,-760.000000,-1785.000000,-700.000000,-1745.000000,0.000000,"no" \n "display"};
item3[] = {"Not_a_client",1,250,-680.000000,-1785.000000,-610.000000,-1745.000000,0.000000,"Not a client"};
item4[] = {"_",8,218,-1025.000000,-1640.000000,-1005.000000,-1630.000000,0.000000,""};
item5[] = {"Check_new",2,250,-880.000000,-1650.000000,-820.000000,-1620.000000,0.000000,"Check" \n "new"};
item6[] = {"Update",2,250,-1045.000000,-1700.000000,-985.000000,-1665.000000,0.000000,"Update"};
item7[] = {"fog",4,218,-875.000000,-1595.000000,-825.000000,-1565.000000,1.000000,"fog"};
item8[] = {"create_fog",2,250,-1045.000000,-1595.000000,-985.000000,-1565.000000,0.000000,"create" \n "fog"};
item9[] = {"__fog",4,218,-875.000000,-1540.000000,-825.000000,-1510.000000,1.000000,"!fog"};
item10[] = {"delete_fog",2,250,-1045.000000,-1540.000000,-985.000000,-1510.000000,0.000000,"delete" \n "fog"};
item11[] = {"Delay",4,218,-950.000000,-1695.000000,-900.000000,-1670.000000,0.000000,"Delay"};
item12[] = {"",7,210,-854.000000,-1686.500000,-846.000000,-1678.500000,0.000000,""};
item13[] = {"snow",4,218,-875.000000,-1490.000000,-825.000000,-1460.000000,1.000000,"snow"};
item14[] = {"create_snow",2,250,-1045.000000,-1490.000000,-985.000000,-1460.000000,0.000000,"create" \n "snow"};
item15[] = {"__snow",4,218,-875.000000,-1440.000000,-825.000000,-1410.000000,1.000000,"!snow"};
item16[] = {"delete_snow",2,250,-1045.000000,-1440.000000,-985.000000,-1410.000000,0.000000,"delete" \n "snow"};
item17[] = {"sand",4,218,-875.000000,-1385.000000,-825.000000,-1355.000000,1.000000,"sand"};
item18[] = {"create_sand",2,4346,-1045.000000,-1385.000000,-985.000000,-1355.000000,0.000000,"create" \n "sand"};
item19[] = {"__sand",4,218,-875.000000,-1330.000000,-825.000000,-1300.000000,1.000000,"!sand"};
item20[] = {"delete_sand",2,250,-1045.000000,-1330.000000,-985.000000,-1300.000000,0.000000,"delete" \n "sand"};
link0[] = {0,1};
link1[] = {0,2};
link2[] = {1,5};
link3[] = {2,3};
link4[] = {4,6};
link5[] = {5,4};
link6[] = {5,7};
link7[] = {5,9};
link8[] = {5,13};
link9[] = {5,15};
link10[] = {5,17};
link11[] = {5,19};
link12[] = {6,11};
link13[] = {7,8};
link14[] = {8,4};
link15[] = {9,10};
link16[] = {10,4};
link17[] = {11,12};
link18[] = {12,5};
link19[] = {13,14};
link20[] = {14,4};
link21[] = {15,16};
link22[] = {16,4};
link23[] = {17,18};
link24[] = {18,4};
link25[] = {19,20};
link26[] = {20,4};
globals[] = {0.000000,0,0,0,0,640,480,1,491,6316128,1,-1149.508423,-638.420349,-1106.102417,-2140.652344,950,1923,1};
window[] = {2,-1,-1,-1,-1,1012,76,1308,76,3,977};
*//*%FSM*/
class FSM
{
fsmName = "weatherEffect";
class States
{
/*%FSM*/
class Start
{
name = "Start";
itemno = 0;
init = /*%FSM*/"/* FSM controlling particle systems." \n
" * Parameters:" \n
" * param [0] - Object that the particle system will be attached to," \n
" * objNull for camera" \n
" *" \n
" * param [1] - List of effects and their selectors" \n
" *" \n
" *" \n
" * Selectors work like this:" \n
" * Each entry in the effect list is an array of [""name"", {code}]." \n
" * Name is either snow, fog or sand." \n
" * Code is the code that evaluates whether the effect is shown or not. Must return " \n
" * true or false. If always shown, code should be {true}" \n
" */" \n
"" \n
"_target = param [0, cameraOn, [objNull]];" \n
"_effects = param [1, [], [[]]];" \n
"" \n
"" \n
"FHQ_handleSnow = {false};" \n
"FHQ_handleFog = {false};" \n
"FHQ_handleSand = {false};" \n
"FHQ_handleWind = {false};" \n
"" \n
"{" \n
" _name = _x param [0];" \n
" _code = _x param [1, {true}, [{true}]];" \n
" " \n
" _code call compile format [""FHQ_handle%1 = _this;"", _name];" \n
"} forEach _effects;" \n
"" \n
"_effectList = [];" \n
"_lastWindTime = 0;" \n
"" \n
"_fogBrightness = 1.0;" \n
"_sandBrightness = 1.0;" \n
"" \n
"FHQ_FogParamArray = [[""\A3\data_f\cl_basic.p3d"", 1, 0, 1], """", " \n
" ""Billboard"", " \n
" 1, " \n
" 10, " \n
" [0, 0, 0], " \n
" wind, " \n
" 1, 1.275, 1, 0," \n
" [4], " \n
" [" \n
" [1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0]," \n
" [1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0.2]," \n
" [1.0 * _fogBrightness, 1.0 * _fogBrightness, 1.0 * _fogBrightness, 0]" \n
" ]," \n
" [1000], 1, 0, """", """", """"];" \n
"" \n
"FHQ_FogParamArrayOld = [" \n
" [""\a3\data_f\ParticleEffects\Universal\Universal.p3d"", " \n
" 16, 12, 13, 0], """", ""Billboard"", " \n
" 1, 10, " \n
" [0, 0, -6], wind, 1, 1.275, 1, 0, [4], " \n
" [[_fogBrightness, _fogBrightness, _fogBrightness, 0], " \n
" [_fogBrightness, _fogBrightness, _fogBrightness, 0.04], " \n
" [1, 1, 1, 0]], [1000], 1, 0, """", """", """"];" \n
" " \n
"FHQ_SandParamArray = [[""\A3\data_f\cl_basic.p3d"", 1, 0, 1], """", " \n
" ""Billboard"", " \n
" 1, " \n
" 10, " \n
" [0, 0, 0], " \n
" wind, " \n
" 1, 1.275, 1, 0," \n
" [10], " \n
" [" \n
" [1.0 * _sandBrightness, 0.9 * _sandBrightness, 0.8 * _sandBrightness, 0]," \n
" [1.0 * _sandBrightness, 0.9 * _sandBrightness, 0.8 * _sandBrightness, 0.2]," \n
" [1.0 * _sandBrightness, 0.9 * _sandBrightness, 0.8 * _sandBrightness, 0]" \n
" ]," \n
" [1000], 1, 0, """", """", """"];" \n
"" \n
" " \n
"FHQ_SandParamArrayStrange = [[""\A3\data_f\cl_basic.p3d"", 1, 0, 1], """", " \n
" ""Billboard"", " \n
" 1, " \n
" 10, " \n
" [0, 0, 0], " \n
" wind, " \n
" 1, 1.275, 1, 0," \n
" [10], " \n
" [" \n
" [0.3 * _sandBrightness, 0.8 * _sandBrightness, 0.3 * _sandBrightness, 0]," \n
" [0.3 * _sandBrightness, 0.8 * _sandBrightness, 0.3 * _sandBrightness, 0.2]," \n
" [0.3 * _sandBrightness, 0.8 * _sandBrightness, 0.3 * _sandBrightness, 0]" \n
" ]," \n
" [1000], 1, 0, """", """", """"];"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class no_display
{
itemno = 2;
priority = 0.000000;
to="Not_a_client";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"!hasInterface"/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
/*%FSM*/
class _
{
itemno = 1;
priority = 0.000000;
to="Check_new";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class Not_a_client
{
name = "Not_a_client";
itemno = 3;
init = /*%FSM*/""/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
};
};
/*%FSM*/
/*%FSM*/
class Check_new
{
name = "Check_new";
itemno = 5;
init = /*%FSM*/"_doSnow = call FHQ_handleSnow;" \n
"_doFog = call FHQ_handleFog;" \n
"_doSand = call FHQ_handleSand;" \n
"_doWind = call FHQ_handleWind;" \n
"" \n
"_currentTime = time;" \n
"" \n
"//diag_log format[""%1 %2 %3"", _doSnow, _doFog, _doSand];"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class fog
{
itemno = 7;
priority = 1.000000;
to="create_fog";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"_doFog && isNil ""FHQ_GrndFog"""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
/*%FSM*/
class __fog
{
itemno = 9;
priority = 1.000000;
to="delete_fog";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"!_doFog && !isNil ""FHQ_GrndFog"""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
/*%FSM*/
class snow
{
itemno = 13;
priority = 1.000000;
to="create_snow";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"_doSnow && isNil ""FHQ_Snow"""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
/*%FSM*/
class __snow
{
itemno = 15;
priority = 1.000000;
to="delete_snow";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"!_doSnow && !isNil ""FHQ_Snow"""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
/*%FSM*/
class sand
{
itemno = 17;
priority = 1.000000;
to="create_sand";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"_doSand && isNil ""FHQ_Sand"""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
/*%FSM*/
class __sand
{
itemno = 19;
priority = 1.000000;
to="delete_sand";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"!_doSand && !isNil ""FHQ_Sand"""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
/*%FSM*/
class _
{
itemno = 4;
priority = 0.000000;
to="Update";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class Update
{
name = "Update";
itemno = 6;
init = /*%FSM*/"_pos = getPos _target;" \n
"" \n
"{" \n
" _obj = _x param [0];" \n
" _ground = _x param [1];" \n
"" \n
" if (_ground) then {" \n
" _obj setPos [_pos select 0, _pos select 1, 0];" \n
" } else {" \n
" _obj setPos _pos;" \n
" }" \n
"} forEach _effectList;" \n
"" \n
"_currentTime = time;" \n
"" \n
"if (_doWind) then {" \n
" if (time - _lastWindTime > 3) then {" \n
" _lastWindTime = time;" \n
" playsound ([""wind1"", ""wind2"", ""wind3"", ""wind4"", ""wind5""] call BIS_fnc_selectRandom);" \n
" };" \n
"};"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class Delay
{
itemno = 11;
priority = 0.000000;
to="Check_new";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/"time - _currentTime > 0.1;"/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class create_fog
{
name = "create_fog";
itemno = 8;
init = /*%FSM*/"_pos = position _target;" \n
"" \n
"FHQ_GrndFog = ""#particlesource"" createVehicleLocal _pos; " \n
"FHQ_GrndFog setParticleParams FHQ_FogParamArray;" \n
"FHQ_GrndFog setParticleRandom [3, [10, 10, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.05], 0, 0];" \n
"FHQ_GrndFog setParticleCircle [20, [0, 0, 0]];" \n
"FHQ_GrndFog setDropInterval 0.07;" \n
"" \n
"_effectList = _effectList + [[FHQ_GrndFog, true]];"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class _
{
itemno = 4;
priority = 0.000000;
to="Update";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class delete_fog
{
name = "delete_fog";
itemno = 10;
init = /*%FSM*/"_effectList = _effectList - [[FHQ_GrndFog, true]];" \n
"" \n
"deleteVehicle FHQ_GrndFog;" \n
"FHQ_GrndFog = nil;"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class _
{
itemno = 4;
priority = 0.000000;
to="Update";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class create_snow
{
name = "create_snow";
itemno = 14;
init = /*%FSM*/"_pos = position _target;" \n
"" \n
"FHQ_Snow = ""#particlesource"" createVehicleLocal _pos; " \n
"FHQ_Snow setParticleParams [" \n
" [""\a3\data_f\ParticleEffects\Universal\Universal.p3d"", 16, 12, 8, 1], """"," \n
" ""Billboard"", 1, 4, [0,0,0], wind, 1, 0.000001, 0, 1.4," \n
" [0.05,0.05], [[1,1,1,1]], [0,1], 0.2, 1.2," \n
" """", """", """"" \n
"];" \n
"FHQ_Snow setParticleRandom [0, [10, 10, 7], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];" \n
"FHQ_Snow setParticleCircle [0.0, [0, 0, 0]];" \n
"FHQ_Snow setDropInterval 0.001;" \n
"" \n
"_effectList = _effectList + [[FHQ_Snow, false]];"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class _
{
itemno = 4;
priority = 0.000000;
to="Update";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class delete_snow
{
name = "delete_snow";
itemno = 16;
init = /*%FSM*/"_effectList = _effectList - [[FHQ_Snow, false]];" \n
"" \n
"deleteVehicle FHQ_Snow;" \n
"FHQ_Snow = nil;"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class _
{
itemno = 4;
priority = 0.000000;
to="Update";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class create_sand
{
name = "create_sand";
itemno = 18;
init = /*%FSM*/"_pos = position _target;" \n
"" \n
"FHQ_Sand = ""#particlesource"" createVehicleLocal _pos; " \n
"FHQ_Sand setParticleParams FHQ_SandParamArray;" \n
"FHQ_Sand setParticleRandom [3, [10, 10, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.05], 0, 0];" \n
"FHQ_Sand setParticleCircle [20, [0, 0, 0]];" \n
"FHQ_Sand setDropInterval 0.07;" \n
"" \n
"" \n
"_effectList = _effectList + [[FHQ_Sand, true]];"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class _
{
itemno = 4;
priority = 0.000000;
to="Update";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
/*%FSM*/
class delete_sand
{
name = "delete_sand";
itemno = 20;
init = /*%FSM*/"_effectList = _effectList - [[FHQ_Sand, true]];" \n
"" \n
"deleteVehicle FHQ_Sand;" \n
"FHQ_Sand = nil;"/*%FSM*/;
precondition = /*%FSM*/""/*%FSM*/;
class Links
{
/*%FSM*/
class _
{
itemno = 4;
priority = 0.000000;
to="Update";
precondition = /*%FSM*/""/*%FSM*/;
condition=/*%FSM*/""/*%FSM*/;
action=/*%FSM*/""/*%FSM*/;
};
/*%FSM*/
};
};
/*%FSM*/
};
initState="Start";
finalStates[] =
{
"Not_a_client",
};
};
/*%FSM*/6Exif MM * 8 ( 1 2 ҇i
'
'Adobe Photoshop CS5.1 Windows 2018:12:30 23:53:40 0221 n v( ~ H H Adobe_CM Adobe d
P "
?
3 !1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw 5 !1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ? ʼQZ-K֊֩4(!A63%&"uV֞]1cYŌ֎\?rRǣ!YSZLJ8Z^^U.j*ߴZ_Qmg-_NKuQήܗ6
m
~\WW_]Uɗ30Ō s+6H2Mˎ[멏nwp Xeϳ}z(tuqX+3Ɔ%l,ߎYlq;zf^Ku {7kE^K,J[\ϳ5ͻ鴗F=H_Y_gMH#.'ukenPmm7{7̻ӿQIR٘F]]UK]65c^{zn&+zz;ns0ݞnǡ>Y\H{}^Q_4 % wTHuR_{YPSl~ 94z(6^C,o7܋̣Y Co*C*0{]mj`nVn<B`*)1:s\4jgWru%[mneL@q\)$$EjZä?:fk2,Hj( z2 wE`cӰVdx; Ys,f:H]d};Hڛ9}@GB8`ӫBun2Cx.vw@!uE6o^*#{ZHQ#>ާet_Hw5ߺR֊rv QeEk@W ۸o}:iۏD}£C i<6Lc6@K&{N<cT{.s
$|uQi0ژhEgH.q:-?ec|(TofֲK~ ~jEjMtFemp_EDYhk\ NZ0yRBTN=^~
nh]#8/c`f<5
iĞ >(6d ?wն8bhuh!Cv,xkR&{{ZșQ5> IsnaGd~
j;\,M'y*ďd=No$Fx
vSZ4vOHvfч(
Ud8FGr< QpiZhoR
6u~i?5VR
%H'?ޗڴ7?l3ktﱿܝS5lLOBR )s9}`ާ rjǾ - 5iU{L=u\ㆪuSN:PAe۬$fTٛP
9nU5)>◼7ͳeHRDLvdk5'>F]/c\#vOjDN'7r "~Mà ?!./2sI'"?ݪN\ev5OؖD1Ԫg]qݠN 5ǃStn5x_HN1ƥ\vXK uW#%viR+P0d|>DY[C@ $*Sn[鸑>bcI^>*1uԠEi%آy#snwvhJlq +hsȕ' " <*No&H͟+DL5L[eu3H8Fcnpp6@ @Ȑ IyN Dd| r4M}Y$|!1J9Rۨqw%N˷I4o×O2[c[[^Z Lu 2C2m[Ԯ˪OIA`mf#K})H5Ue$8 'iUgkٺv;kq_~}GON7g`1=_K]~XQȩr{,0K@0;kxUm/v8h~,<[2b3\ku?kkV,͍kpz2kieY{et5-F}] ?K;+M3PHTys^v913sL8hO"ȣ[[XM=F~?"ժ]>; 5etsCt鯹;߇ p=謹Q|g<9FIվ**M 7$ ]E >5o,_cOšF9'QhyM⌀=¨93[#
OY9XֻVLcp$L(zox