mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
New Function: Epoch_message
This commit is contained in:
parent
923788949b
commit
b219235534
@ -381,7 +381,7 @@ class FSM
|
||||
condition="diag_tickTime - _lastChat > _taskDiagSquelch && call _taskDiagCond3 && count _taskDiag3 > 0";
|
||||
action="_diag = selectRandom _taskDiag3;" \n
|
||||
"" \n
|
||||
"[format [""<t size='1.6' color='#99ffffff'>%1</t>"",_diag], 5] call Epoch_dynamicText;" \n
|
||||
"[_diag, 5] call Epoch_message;" \n
|
||||
"" \n
|
||||
"" \n
|
||||
"_chat3Done = true;" \n
|
||||
@ -395,7 +395,7 @@ class FSM
|
||||
precondition = "";
|
||||
condition="diag_tickTime - _lastChat > _taskDiagSquelch && call _taskDiagCond2 && count _taskDiag2 > 0";
|
||||
action="_diag = selectRandom _taskDiag2;" \n
|
||||
"[format [""<t size='1.6' color='#99ffffff'>%1</t>"",_diag], 5] call Epoch_dynamicText;" \n
|
||||
"[_diag, 5] call Epoch_message;" \n
|
||||
"_chat2Done = true;" \n
|
||||
"_lastChat = diag_tickTime;";
|
||||
};
|
||||
@ -416,7 +416,7 @@ class FSM
|
||||
precondition = "";
|
||||
condition="(!_chat1Done) && call _taskDiagCond1 && count _taskDiag1 > 0";
|
||||
action="_diag = selectRandom _taskDiag1;" \n
|
||||
"[format [""<t size='1.6' color='#99ffffff'>%1</t>"",_diag], 5] call Epoch_dynamicText;" \n
|
||||
"[_diag, 5] call Epoch_message;" \n
|
||||
"_chat1Done = true;" \n
|
||||
"_lastChat = diag_tickTime;";
|
||||
};
|
||||
@ -764,7 +764,7 @@ class FSM
|
||||
precondition = "";
|
||||
condition="!_diag1Done && count _taskCompleteDiag1 > 0";
|
||||
action="_diag = selectRandom _taskCompleteDiag1;" \n
|
||||
"[format [""<t size='1.6' color='#99ffffff'>%1</t>"",_diag], 5] call Epoch_dynamicText;" \n
|
||||
"[_diag, 5] call Epoch_message;" \n
|
||||
"_diag1Done = true;";
|
||||
};
|
||||
class diag_2
|
||||
@ -775,7 +775,7 @@ class FSM
|
||||
precondition = "";
|
||||
condition="_diag1Done && (!_diag2Done) && diag_tickTime - _lastLoop > 20 && count _taskCompleteDiag2 > 0";
|
||||
action="_diag = selectRandom _taskCompleteDiag2;" \n
|
||||
"[format [""<t size='1.6' color='#99ffffff'>%1</t>"",_diag], 5] call Epoch_dynamicText;" \n
|
||||
"[_diag, 5] call Epoch_message;" \n
|
||||
"_diag2Done = true;";
|
||||
};
|
||||
class call
|
||||
@ -1040,7 +1040,7 @@ class FSM
|
||||
precondition = "";
|
||||
condition="count _taskFailedDiag > 0";
|
||||
action="_diag = selectRandom _taskFailedDiag;" \n
|
||||
"[format [""<t size='1.6' color='#99ffffff'>%1</t>"",_diag], 5] call Epoch_dynamicText;" \n
|
||||
"[_diag, 5] call Epoch_message;" \n
|
||||
"_taskFailedDiag = [];";
|
||||
};
|
||||
class pause
|
||||
@ -1081,7 +1081,7 @@ class FSM
|
||||
precondition = "";
|
||||
condition="count _taskReminder > 0 && !_taskFailed";
|
||||
action="_diag = selectRandom _taskReminder;" \n
|
||||
"[format [""<t size='1.6' color='#99ffffff'>%1</t>"",_diag], 5] call Epoch_dynamicText;" \n
|
||||
"[_diag, 5] call Epoch_message;" \n
|
||||
"_taskReminder = [];";
|
||||
};
|
||||
class markers
|
||||
|
@ -72,7 +72,7 @@ _unifiedInteract = {
|
||||
{
|
||||
_output = [_forEachIndex, _x] call _giveAttributes;
|
||||
if (_output != "") then {
|
||||
[format["<t size='1.6' color='#99ffffff'>%1</t>", _output], 5] call Epoch_dynamicText;
|
||||
[_output, 5] call Epoch_message;
|
||||
};
|
||||
} foreach _interactAttributes;
|
||||
};
|
||||
@ -106,7 +106,7 @@ switch _interactOption do {
|
||||
if ((_magazineSize % _magazineSizeMax) > 0) then {
|
||||
player addMagazine [_item, floor (_magazineSize % _magazineSizeMax)];
|
||||
};
|
||||
["<t size='1.6' color='#99ffffff'>Ammo Repacked</t>", 5] call Epoch_dynamicText;
|
||||
["Ammo Repacked", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
case 1: _unifiedInteract; // Eat 1
|
||||
@ -148,7 +148,7 @@ switch _interactOption do {
|
||||
[_object] spawn EPOCH_simulSwap;
|
||||
};
|
||||
} else {
|
||||
["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Frequency Unstable</t>", 5] call Epoch_dynamicText;
|
||||
["Building Disallowed: Frequency Unstable", 5] call Epoch_message;
|
||||
};
|
||||
} else {
|
||||
_object=createVehicle[_buildClass,_pos,[],0,"CAN_COLLIDE"];
|
||||
@ -156,14 +156,14 @@ switch _interactOption do {
|
||||
[_object,_item] spawn EPOCH_staticMove;
|
||||
};
|
||||
// _object spawn EPOCH_countdown;
|
||||
[format["<t size='1.6' color='#99ffffff'>Press '%1' to drop object.</t>", "1"], 5] call Epoch_dynamicText;
|
||||
[format["Press '%1' to drop object.", "1"], 5] call Epoch_message;
|
||||
|
||||
} else {
|
||||
["<t size = '1.6' color = '#99ffffff'>Need Energy< / t>", 5] call Epoch_dynamicText;
|
||||
["Need Energy", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
["<t size='1.6' color='#99ffffff'>World limit reached</t>", 5] call Epoch_dynamicText;
|
||||
["World limit reached", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -185,7 +185,7 @@ switch _interactOption do {
|
||||
// send
|
||||
[_vehicle,_newFuel,player,Epoch_personalToken] remoteExec ["EPOCH_server_fillVehicle",2];
|
||||
|
||||
["<t size='1.6' color='#99ffffff'>Fuel Added</t>", 5] call Epoch_dynamicText;
|
||||
["Fuel Added", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -200,10 +200,10 @@ switch _interactOption do {
|
||||
if (_item call _removeItem) then {
|
||||
_interactReturnOnUse call EPOCH_fnc_addItemOverflow;
|
||||
[_vehicle,_newFuel,player,Epoch_personalToken] remoteExec ["EPOCH_server_fillVehicle",2];
|
||||
["<t size='1.6' color='#99ffffff'>Fuel Siphoned</t>", 5] call Epoch_dynamicText;
|
||||
["Fuel Siphoned", 5] call Epoch_message;
|
||||
};
|
||||
} else {
|
||||
["<t size='1.6' color='#99ffffff'>Not Enough Fuel</t>", 5] call Epoch_dynamicText;
|
||||
["Not Enough Fuel", 5] call Epoch_message;
|
||||
};
|
||||
} else {
|
||||
|
||||
@ -216,10 +216,10 @@ switch _interactOption do {
|
||||
if (_transportFuel > _canCapacity) then {
|
||||
if (_item call _removeItem) then {
|
||||
_interactReturnOnUse call EPOCH_fnc_addItemOverflow;
|
||||
["<t size='1.6' color='#99ffffff'>Fuel Siphoned</t>", 5] call Epoch_dynamicText;
|
||||
["Fuel Siphoned", 5] call Epoch_message;
|
||||
};
|
||||
} else {
|
||||
["<t size='1.6' color='#99ffffff'>Not Enough Fuel</t>", 5] call Epoch_dynamicText;
|
||||
["Not Enough Fuel", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -260,7 +260,7 @@ switch _interactOption do {
|
||||
[_vehicle,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
|
||||
};
|
||||
};
|
||||
["<t size='1.6' color='#99ffffff'>Vehicle Partially Repaired</t>", 5] call Epoch_dynamicText;
|
||||
["Vehicle Partially Repaired", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -270,7 +270,7 @@ switch _interactOption do {
|
||||
if (_vehicle in _vehicles) then {
|
||||
if (_item call _removeItem) then {
|
||||
[_vehicle,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
|
||||
["<t size='1.6' color='#99ffffff'>Vehicle Fully Repaired</t>", 5] call Epoch_dynamicText;
|
||||
["Vehicle Fully Repaired", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -293,13 +293,12 @@ switch _interactOption do {
|
||||
|
||||
[_vehicle,_paintCanIndex,player,Epoch_personalToken] remoteExec ["EPOCH_server_paintBUILD",2];
|
||||
|
||||
_msg = format["Wall Painted %1", _paintCanColor];
|
||||
[format["<t size='1.6' color='#99ffffff'>%1</t>", _msg], 5] call Epoch_dynamicText;
|
||||
[format["Wall Painted %1", _paintCanColor], 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
}
|
||||
else {
|
||||
["<t size = '1.6' color = '#99ffffff'>Disallowed</t>", 5] call Epoch_dynamicText;
|
||||
["Disallowed", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -311,14 +310,14 @@ switch _interactOption do {
|
||||
if (damage _vehicle != 0) then {
|
||||
if (_item call _removeItem) then {
|
||||
[_vehicle,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
|
||||
["<t size = '1.6' color = '#99ffffff'>Healed other player</t>", 5] call Epoch_dynamicText;
|
||||
["Healed other player", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (damage player != 0) then {
|
||||
if (_item call _removeItem) then {
|
||||
[player,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
|
||||
["<t size = '1.6' color = '#99ffffff'>Healed yourself</t>", 5] call Epoch_dynamicText;
|
||||
["Healed yourself", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -327,11 +326,11 @@ switch _interactOption do {
|
||||
case 14: { // Unpack Backpack
|
||||
if (_item call _removeItem) then {
|
||||
[_interactReturnOnUse,player,Epoch_personalToken] remoteExec ["EPOCH_server_unpackBackpack",2];
|
||||
["<t size = '1.6' color = '#99ffffff'>Unpacked backpack</t>", 5] call Epoch_dynamicText;
|
||||
["Unpacked backpack", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
|
||||
default {
|
||||
["<t size='1.6' color='#99ffffff'>Found nothing</t>", 5] call Epoch_dynamicText;
|
||||
["Found nothing", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
|
@ -30,7 +30,7 @@ if (surfaceIsWater _currentPos) then {
|
||||
EPOCH_myBobber = _bobber;
|
||||
} else {
|
||||
if (_bobber distance player > 12) then {
|
||||
["<t size='1.6' color='#99ffffff'>No bobber found within 12m.</t>", 5] call Epoch_dynamicText;
|
||||
["No bobber found within 12m.", 5] call Epoch_message;
|
||||
} else {
|
||||
_castTime = _bobber getVariable ["EPOCH_bobberTime", diag_tickTime];
|
||||
_diffTime = (diag_tickTime - _castTime) / 10;
|
||||
@ -59,10 +59,10 @@ if (surfaceIsWater _currentPos) then {
|
||||
_fish = selectRandom _fishes;
|
||||
if (_fish != "") then {
|
||||
_fish call EPOCH_fnc_addItemOverflow;
|
||||
["<t size='1.6' color='#99ffffff'>Fish Caught</t>", 5] call Epoch_dynamicText;
|
||||
["Fish Caught", 5] call Epoch_message;
|
||||
};
|
||||
} else {
|
||||
["<t size='1.6' color='#99ffffff'>Fish Got Away</t>", 5] call Epoch_dynamicText;
|
||||
["Fish Got Away", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -17,5 +17,5 @@
|
||||
|
||||
*/
|
||||
if (isLocalized (_this select 0)) then{
|
||||
[format["<t size = ""1.6"" color = ""#99ffffff"">%1</t>", format[localize (_this select 0), _this select 1]], 5] call Epoch_dynamicText;
|
||||
[format["%1", format[localize (_this select 0), _this select 1]], 5] call Epoch_message;
|
||||
};
|
||||
|
@ -74,13 +74,13 @@ if (diag_tickTime - EPOCH_lastTrash > 2) then {
|
||||
// send
|
||||
[_lootAnimalObj, player, Epoch_personalToken] remoteExec ["EPOCH_server_lootAnimal",2];
|
||||
_return = true;
|
||||
["<t size='1.6' color='#99ffffff'>Object Looted</t>", 5] call Epoch_dynamicText;
|
||||
["Object Looted", 5] call Epoch_message;
|
||||
};
|
||||
if (!isNull _destroyTrashObj) then {
|
||||
[_destroyTrashObj, _trashType, player, Epoch_personalToken] remoteExec ["EPOCH_server_destroyTrash",2];
|
||||
EPOCH_playerSoiled = (EPOCH_playerSoiled + 1) min 100;
|
||||
_return = true;
|
||||
["<t size='1.6' color='#99ffffff'>Object Looted</t>", 5] call Epoch_dynamicText;
|
||||
["Object Looted", 5] call Epoch_message;
|
||||
|
||||
// Snake Den
|
||||
if (random 1 < 0.04) then {
|
||||
|
@ -44,13 +44,13 @@ _config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_jammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
_jammers = nearestObjects[_targetPos, ["PlotPole_EPOCH"], _jammerRange];
|
||||
if(count _jammers > 0 && (_unitClass in _nonJammer))exitWith{
|
||||
if(_doVariable)then{["<t size='1.6' color='#99ffffff'>Not allowed near a base - Please respawn !</t>", 5] call Epoch_dynamicText;};
|
||||
if(_doVariable)then{["Not allowed near a base - Please respawn !", 5] call Epoch_message;};
|
||||
};
|
||||
|
||||
_restricted = [];
|
||||
_restricted = nearestObjects [_targetPos, ["ProtectionZone_Invisible_F"], _nonTraderAIRange];
|
||||
if(count _restricted > 0 && (_unitClass in _nonTrader))exitWith{
|
||||
if(_doVariable)then{["<t size='1.6' color='#99ffffff'>Not allowed near a trader - Please respawn !</t>", 5] call Epoch_dynamicText;};
|
||||
if(_doVariable)then{["Not allowed near a trader - Please respawn !", 5] call Epoch_message;};
|
||||
};
|
||||
|
||||
_disableAI = {
|
||||
|
@ -97,9 +97,9 @@ if !(isNull _object) then{
|
||||
_object animate[_anim, _state, true];
|
||||
// push interacted object to queue to save later
|
||||
EPOCH_arr_interactedObjs pushBackUnique _object;
|
||||
[format["<t size='1.6' color='#99ffffff'>%1 part on %2</t>", "Added", _objClass call EPOCH_itemDisplayName], 5] call Epoch_dynamicText;
|
||||
[format["%1 part on %2", "Added", _objClass call EPOCH_itemDisplayName], 5] call Epoch_message;
|
||||
} else {
|
||||
[format["<t size='1.6' color='#99ffffff'>%1</t>", _msg], 5] call Epoch_dynamicText;
|
||||
[_msg, 5] call Epoch_message;
|
||||
};
|
||||
} else {
|
||||
// Remove part
|
||||
@ -118,6 +118,6 @@ if !(isNull _object) then{
|
||||
_craftItem call EPOCH_fnc_addItemOverflow;
|
||||
};
|
||||
}forEach _recipe;
|
||||
[format["<t size='1.6' color='#99ffffff'>%1 part on %2</t>", "Removed", _objClass call EPOCH_itemDisplayName], 5] call Epoch_dynamicText;
|
||||
[format["%1 part on %2", "Removed", _objClass call EPOCH_itemDisplayName], 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ if (isNull _object) exitWith{ _out };
|
||||
if ((player distance _object) > 9) exitWith { _out };
|
||||
|
||||
if !(EPOCH_buildMode > 0) exitWith {_out};
|
||||
if (EPOCH_playerEnergy <= 0) exitWith{ ["<t size='1.6' color='#99ffffff'>Need energy</t>", 5] call Epoch_dynamicText; _out };
|
||||
if (EPOCH_playerEnergy <= 0) exitWith{ ["Need energy", 5] call Epoch_message; _out };
|
||||
|
||||
_objType = typeOf _object;
|
||||
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;
|
||||
|
@ -25,7 +25,7 @@ private ["_targeter","_stability"];
|
||||
|
||||
if !(isNil "EPOCH_simulSwap_Lock") exitWith{ false };
|
||||
if !(isNull EPOCH_Target) exitWith{ false };
|
||||
if (EPOCH_playerEnergy <= 0) exitWith{ ["<t size='1.6' color='#99ffffff'>Need energy</t>", 5] call Epoch_dynamicText; false };
|
||||
if (EPOCH_playerEnergy <= 0) exitWith{ ["Need energy", 5] call Epoch_message; false };
|
||||
|
||||
params [["_object",objNull]];
|
||||
|
||||
|
@ -29,7 +29,7 @@ _ownedJammerExists = false;
|
||||
_nearestJammer = objNull;
|
||||
|
||||
// reject building if in vehicle
|
||||
if (vehicle player != player)exitWith{["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Inside Vehicle</t>", 5] call Epoch_dynamicText; false };
|
||||
if (vehicle player != player)exitWith{["Building Disallowed: Inside Vehicle", 5] call Epoch_message; false };
|
||||
|
||||
// defaults
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
@ -58,7 +58,7 @@ if !(_jammer isEqualTo []) then {
|
||||
{
|
||||
if (alive _x) exitWith{
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Existing Jammer Signal</t>", 5] call Epoch_dynamicText;
|
||||
["Building Disallowed: Existing Jammer Signal", 5] call Epoch_message;
|
||||
};
|
||||
} foreach _jammer;
|
||||
} else {
|
||||
@ -74,12 +74,12 @@ if !(_jammer isEqualTo []) then {
|
||||
_ownedJammerExists = true;
|
||||
} else {
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Frequency Blocked</t>", 5] call Epoch_dynamicText;
|
||||
["Building Disallowed: Frequency Blocked", 5] call Epoch_message;
|
||||
};
|
||||
_objectCount = count nearestObjects[_nearestJammer, ["Constructions_static_F"], _buildingJammerRange];
|
||||
if (_objectCount >= _buildingCountLimit) then {
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Frequency Overloaded</t>", 5] call Epoch_dynamicText;
|
||||
["Building Disallowed: Frequency Overloaded", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -96,7 +96,7 @@ if (!_ownedJammerExists) then{
|
||||
// TODO: not properly limiting simulated objects
|
||||
if (_objectCount >= _limitNearby) then{
|
||||
_buildingAllowed = false;
|
||||
[format["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Limit %1</t>", _limitNearby], 5] call Epoch_dynamicText;
|
||||
[format["Building Disallowed: Limit %1", _limitNearby], 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -107,7 +107,7 @@ if (getNumber(_config >> "buildingRequireJammer") == 0 && _bypassJammer == 0) th
|
||||
if !(_objType in ["PlotPole_EPOCH", "PlotPole_SIM_EPOCH"]) then {
|
||||
_buildingAllowed = _ownedJammerExists;
|
||||
if !(_buildingAllowed) then {
|
||||
["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Frequency Jammer Needed</t>", 5] call Epoch_dynamicText;
|
||||
["Building Disallowed: Frequency Jammer Needed", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -126,20 +126,20 @@ if (getNumber(_config >> "buildingNearbyMilitary") == 0) then{
|
||||
};
|
||||
if !(_restricted isEqualTo []) then {
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Protected Frequency</t>", 5] call Epoch_dynamicText;
|
||||
["Building Disallowed: Protected Frequency", 5] call Epoch_message;
|
||||
};
|
||||
|
||||
_restrictedLocations = nearestLocations [player, ["NameCityCapital"], 300];
|
||||
if !(_restrictedLocations isEqualTo []) then {
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Protected Frequency</t>", 5] call Epoch_dynamicText;
|
||||
["Building Disallowed: Protected Frequency", 5] call Epoch_message;
|
||||
};
|
||||
|
||||
_myPosATL = getPosATL player;
|
||||
{
|
||||
if ((_x select 0) distance _myPosATL < (_x select 1)) exitWith {
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Building Disallowed: Protected Frequency</t>", 5] call Epoch_dynamicText;
|
||||
["Building Disallowed: Protected Frequency", 5] call Epoch_message;
|
||||
};
|
||||
} forEach(getArray(_config >> worldname >> "blockedArea"));
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
NOTHING
|
||||
*/
|
||||
private ["_buildingJammerRange","_maintainCount","_rnd","_config"];
|
||||
if !(isNil "EPOCH_maintainLockout") exitWith {["<t size=""1.6"" color=""#99ffffff"">Already Maintaining a base.</t>", 5] call Epoch_dynamicText;};
|
||||
if !(isNil "EPOCH_maintainLockout") exitWith {["Already Maintaining a base.", 5] call Epoch_message;};
|
||||
if (EPOCH_playerCrypto > 0) then {
|
||||
_config = "CfgEpochClient" call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
@ -51,10 +51,10 @@ if (EPOCH_playerCrypto > 0) then {
|
||||
EPOCH_maintainLockout = nil;
|
||||
};
|
||||
|
||||
[format["<t size=""1.6"" color=""#99ffffff"">Cost %1 Krypto to maintain base.</t>", _maintainCount], 5] call Epoch_dynamicText;
|
||||
[format["Cost %1 Krypto to maintain base.", _maintainCount], 5] call Epoch_message;
|
||||
} else {
|
||||
["<t size=""1.6"" color=""#99ffffff"">Nothing needs Maintaining</t>", 5] call Epoch_dynamicText;
|
||||
["Nothing needs Maintaining", 5] call Epoch_message;
|
||||
};
|
||||
} else {
|
||||
["<t size=""1.6"" color=""#99ffffff"">You need Krypto to maintain a base.</t>", 5] call Epoch_dynamicText;
|
||||
["You need Krypto to maintain a base.", 5] call Epoch_message;
|
||||
};
|
||||
|
@ -58,7 +58,7 @@ if (_stability > 0) exitWith{
|
||||
if (_objType == "PlotPole_EPOCH") then {
|
||||
if ((_object getVariable["BUILD_OWNER", "-1"]) != getPlayerUID player) then{
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Remove Disallowed: Frequency Blocked</t>", 5] call Epoch_dynamicText;
|
||||
["Remove Disallowed: Frequency Blocked", 5] call Epoch_message;
|
||||
};
|
||||
}
|
||||
else {
|
||||
@ -75,7 +75,7 @@ else {
|
||||
_ownedJammerExists = true;
|
||||
} else {
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Remove Disallowed: Frequency Blocked</t>", 5] call Epoch_dynamicText;
|
||||
["Remove Disallowed: Frequency Blocked", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -87,6 +87,6 @@ _removeParts = getArray(('CfgBaseBuilding' call EPOCH_returnConfig) >> _objType
|
||||
if !(_removeParts isEqualTo[]) then{
|
||||
[_this, player, Epoch_personalToken] remoteExec ["EPOCH_server_removeBUILD",2];
|
||||
_return = true;
|
||||
["<t size='1.6' color='#99ffffff'>Removed</t>", 5] call Epoch_dynamicText;
|
||||
["Removed", 5] call Epoch_message;
|
||||
};
|
||||
_return
|
||||
|
@ -32,7 +32,7 @@ _objType = typeOf _object;
|
||||
_isSnap = false;
|
||||
|
||||
if (EPOCH_playerEnergy <= 0) exitWith {
|
||||
["<t size = '1.6' color = '#99ffffff'>Need Energy</t>", 5] call Epoch_dynamicText;
|
||||
["Need Energy", 5] call Epoch_message;
|
||||
};
|
||||
if !(_objType call EPOCH_isBuildAllowed) exitWith{};
|
||||
|
||||
|
@ -35,7 +35,7 @@ if (isNull _object) exitWith{ EPOCH_target = objNull; };
|
||||
if (_item == "") exitWith{ EPOCH_target = objNull; };
|
||||
|
||||
if (EPOCH_playerEnergy <= 0) exitWith{
|
||||
["<t size = '1.6' color = '#99ffffff'>Need Energy</t>", 5] call Epoch_dynamicText;
|
||||
["Need Energy", 5] call Epoch_message;
|
||||
};
|
||||
|
||||
// Remove object if not allowed
|
||||
|
@ -71,7 +71,7 @@ if !(_jammer isEqualTo[]) then {
|
||||
}
|
||||
else {
|
||||
_buildingAllowed = false;
|
||||
["<t size = '1.6' color = '#99ffffff'>Upgrade Disallowed: Frequency Blocked</t>", 5] call Epoch_dynamicText;
|
||||
["Upgrade Disallowed: Frequency Blocked", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -123,10 +123,10 @@ if (_object isKindOf "Constructions_static_F") then {
|
||||
[_object,player,Epoch_upgradeIndex,Epoch_personalToken] remoteExec ["EPOCH_server_upgradeBUILD",2];
|
||||
Epoch_upgradeIndex = nil;
|
||||
_return = true;
|
||||
["<t size='1.6' color='#99ffffff'>Upgraded</t>", 5] call Epoch_dynamicText;
|
||||
["Upgraded", 5] call Epoch_message;
|
||||
};
|
||||
} else {
|
||||
[format["<t size='1.6' color='#99ffffff'>%1</t>", _missingParts], 5] call Epoch_dynamicText;
|
||||
[_missingParts, 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -45,7 +45,7 @@ if (Epoch_canBeRevived) then {
|
||||
createDialog _tapDiag;
|
||||
} else {
|
||||
setPlayerRespawnTime 15;
|
||||
["<t size='1.6' color='#99ffffff'>You can be just revived once per life!</t>", 5] call Epoch_dynamicText;
|
||||
["You can be just revived once per life!", 5] call Epoch_message;
|
||||
};
|
||||
|
||||
[_killer, _tapDiag] spawn{
|
||||
|
@ -42,13 +42,13 @@ if (_dikCode in [0x02,0x03,0x04,0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3
|
||||
if (_ctrl && _dikCode == EPOCH_keysVolumeUp) then {
|
||||
EPOCH_soundLevel = (EPOCH_soundLevel + 0.1) min 1;
|
||||
5 fadeSound EPOCH_soundLevel;
|
||||
[format["<t size = '1.6' color = '#99ffffff'>Internal sound level: %1%2 </t>", EPOCH_soundLevel * 100, "%"], 5] call Epoch_dynamicText;
|
||||
[format["Internal sound level: %1%2", EPOCH_soundLevel * 100, "%"], 5] call Epoch_message;
|
||||
};
|
||||
// lower vol
|
||||
if (_ctrl && _dikCode == EPOCH_keysVolumeDown) then {
|
||||
EPOCH_soundLevel = (EPOCH_soundLevel - 0.1) max 0.1;
|
||||
5 fadeSound EPOCH_soundLevel;
|
||||
[format["<t size = '1.6' color = '#99ffffff'>Internal sound level: %1%2 </t>", EPOCH_soundLevel * 100,"%"], 5] call Epoch_dynamicText;
|
||||
[format["Internal sound level: %1%2", EPOCH_soundLevel * 100,"%"], 5] call Epoch_message;
|
||||
};
|
||||
|
||||
// ESC default to cancel
|
||||
@ -59,7 +59,7 @@ if (_dikCode == 0x01) then {
|
||||
} else {
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
["<t size = '1.6' color = '#99ffffff'>Build Canceled</t>", 5] call Epoch_dynamicText;
|
||||
["Build Canceled", 5] call Epoch_message;
|
||||
};
|
||||
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
|
||||
[EPOCH_arr_interactedObjs] remoteExec["EPOCH_server_save_vehicles", 2];
|
||||
@ -71,9 +71,9 @@ if (_dikCode == 0x01) then {
|
||||
if (_dikCode == EPOCH_keysDebugMon) then {
|
||||
EPOCH_debugMode = !EPOCH_debugMode;
|
||||
if (EPOCH_debugMode) then {
|
||||
["<t size = '1.6' color = '#99ffffff'>Debug Mode Enabled</t>", 5] call Epoch_dynamicText;
|
||||
["Debug Mode Enabled", 5] call Epoch_message;
|
||||
} else {
|
||||
["<t size = '1.6' color = '#99ffffff'>Debug Mode Disabled</t>", 5] call Epoch_dynamicText;
|
||||
["Debug Mode Disabled", 5] call Epoch_message;
|
||||
hintSilent "";
|
||||
};
|
||||
_handled = true;
|
||||
@ -100,7 +100,7 @@ if (vehicle player == player) then {
|
||||
_disableBuildMode = {
|
||||
EPOCH_buildMode = 0;
|
||||
EPOCH_snapDirection = 0;
|
||||
["<t size = '1.6' color = '#99ffffff'>Build Mode Disabled</t>", 5] call Epoch_dynamicText;
|
||||
["Build Mode Disabled", 5] call Epoch_message;
|
||||
EPOCH_Target = objNull;
|
||||
EPOCH_Z_OFFSET = 0;
|
||||
EPOCH_X_OFFSET = 0;
|
||||
@ -113,10 +113,10 @@ if (vehicle player == player) then {
|
||||
if (EPOCH_playerEnergy > 0) then {
|
||||
EPOCH_stabilityTarget = objNull;
|
||||
EPOCH_buildMode = 1;
|
||||
["<t size = '1.6' color = '#99ffffff'>Build Mode Enabled: Snap alignment</t>", 5] call Epoch_dynamicText;
|
||||
["Build Mode Enabled: Snap alignment", 5] call Epoch_message;
|
||||
EPOCH_buildDirection = 0;
|
||||
} else {
|
||||
["<t size = '1.6' color = '#99ffffff'>Need Energy</t>", 5] call Epoch_dynamicText;
|
||||
["Need Energy", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
_handled = true;
|
||||
@ -128,11 +128,11 @@ if (vehicle player == player) then {
|
||||
if (EPOCH_playerEnergy > 0) then {
|
||||
EPOCH_stabilityTarget = objNull;
|
||||
EPOCH_buildMode = 2;
|
||||
["<t size = '1.6' color = '#99ffffff'>Build Mode Enabled: Free</t>", 5] call Epoch_dynamicText;
|
||||
["Build Mode Enabled: Free", 5] call Epoch_message;
|
||||
EPOCH_buildDirection = 0;
|
||||
}
|
||||
else {
|
||||
["<t size = '1.6' color = '#99ffffff'>Need Energy</t>", 5] call Epoch_dynamicText;
|
||||
["Need Energy", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
_handled = true;
|
||||
@ -158,10 +158,10 @@ if (vehicle player == player) then {
|
||||
EPOCH_snapDirection = EPOCH_snapDirection + 1;
|
||||
if (EPOCH_snapDirection > 3) then {
|
||||
EPOCH_snapDirection = 0;
|
||||
["<t size = '1.6' color = '#99ffffff'>SNAP DIRECTION MODE: 0</t>", 5] call Epoch_dynamicText;
|
||||
["SNAP DIRECTION MODE: 0", 5] call Epoch_message;
|
||||
}
|
||||
else {
|
||||
[format["<t size = '1.6' color = '#99ffffff'>SNAP DIRECTION MODE: %1</t>", EPOCH_snapDirection], 5] call Epoch_dynamicText;
|
||||
[format["SNAP DIRECTION MODE: %1", EPOCH_snapDirection], 5] call Epoch_message;
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
@ -241,7 +241,7 @@ if (vehicle player == player) then {
|
||||
} else {
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
["<t size = '1.6' color = '#99ffffff'>Build Canceled</t>", 5] call Epoch_dynamicText;
|
||||
["Build Canceled", 5] call Epoch_message;
|
||||
};
|
||||
if (isTouchingGround player) then {
|
||||
// _handled = call EPOCH_lootTrash;
|
||||
|
@ -93,7 +93,7 @@ _menuCondition = getText(getMissionConfig "epochMissions" >> (_missionClasses se
|
||||
_doTask = _uiNSTask;
|
||||
}else{
|
||||
_allowTask = false;
|
||||
[format ["<t size='1.6' color='#99ffffff'>Already on a mission - %1</t>",selectRandom ['Chop Chop !','Get on With It !','What are you waiting for ?','No bonuses for tardiness !']], 5] call Epoch_dynamicText;
|
||||
[format ["Already on a mission - %1",selectRandom ['Chop Chop !','Get on With It !','What are you waiting for ?','No bonuses for tardiness !']], 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
|
||||
@ -105,12 +105,12 @@ _menuCondition = getText(getMissionConfig "epochMissions" >> (_missionClasses se
|
||||
|
||||
}else{
|
||||
|
||||
[format["<t size='1.6' color='#99ffffff'>Mission Not Allowed !</t>",_menuCondition], 5] call Epoch_dynamicText;
|
||||
[format["Mission Not Allowed !",_menuCondition], 5] call Epoch_message; //Not formatting, is this intended?
|
||||
|
||||
};
|
||||
|
||||
|
||||
} else {
|
||||
//systemChat format ["Trader Not Found",""];
|
||||
["<t size='1.6' color='#99ffffff'>Trader Lost. Goodbye.</t>", 5] call Epoch_dynamicText;
|
||||
["Trader Lost. Goodbye.", 5] call Epoch_message;
|
||||
};
|
||||
|
@ -1,2 +1,2 @@
|
||||
missionNamespace setVariable ["EPOCH_playerMissionArray",[]];
|
||||
[format ["<t size='1.6' color='#99ffffff'>%1</t>","Missions Reset - Re-open Trader Menu."], 5] call Epoch_dynamicText;
|
||||
["Missions Reset - Re-open Trader Menu.", 5] call Epoch_message;
|
||||
|
@ -12,4 +12,4 @@ _trader setVariable ["traderName",_newName, true];
|
||||
|
||||
};
|
||||
_responseArr = ["I don't know. You can only be regenerated so many times before the memory starts to go..","You again..! Go bother someone else.",format["There was a time when names mattered, call me %1.",name _trader],"My name..? What does it matter.","Hey buddy you rock up here unannounced and suddenly we're friends ? On your bike if you aren't buying or selling.",format["My name.. I am known as %1",name _trader], format["When names mattered I was called %1",name _trader],"I forget.. At least, I try to forget."];
|
||||
[format ["<t size='1.6' color='#99ffffff'>%1</t>",selectRandom _responseArr], 5] call Epoch_dynamicText;
|
||||
[selectRandom _responseArr, 5] call Epoch_message;
|
@ -9,4 +9,4 @@ if (count _plyrs < 2) then {
|
||||
_plyr = selectRandom _plyrs;
|
||||
_trdrMsg = format["%2 %1.",name _plyr, selectRandom ["The last person picked up by the UAV was","I did spot someone earlier, their name was","I heard there was somebody new in the area, "]];
|
||||
};
|
||||
[format ["<t size='1.6' color='#99ffffff'>%1</t>",_trdrMsg], 5] call Epoch_dynamicText;
|
||||
[_trdrMsg, 5] call Epoch_message;
|
@ -10,4 +10,4 @@ if (count _vehs < 1) then {
|
||||
_dist = _veh distance _plyr;
|
||||
_trdrMsg = format["I know of at least one vehicle within %1m of my current location. It looks like a %2.",_dist, typeof _veh];
|
||||
};
|
||||
[format ["<t size='1.6' color='#99ffffff'>%1</t>",_trdrMsg], 5] call Epoch_dynamicText;
|
||||
[_trdrMsg, 5] call Epoch_message;
|
@ -1,3 +1,3 @@
|
||||
_newsArr = ["My dog was shot. That made me sad.","Business has been quiet since word got out that sappers are in the area.","Looters are expecting too much crypto for all the junk they bring in.","What do I look like ? A newspaper vendor. Go Away.","The sun came up again this morning.. That's good news I suppose.","Keep your dog fed with raw or cooked carcasses.","Sappers are known to be good for their pelts. Just don't get too close to one","Some very strange rumours that a Construct was seen in the mountains. Those things are just bedtime stories to scare kids with.","UAVs are a good source of components.","Some say the nearby town is haunted by malevolent spirits.","I hear the military are helping survivors with air drops. Your loot is always welcome here if you find one.","Dogs can help you find pelts and animal carcasses","I heard that a new vehicle has been seen, some kind of board that you stand on. I personally don't believe the rumours."];
|
||||
|
||||
[format ["<t size='1.6' color='#99ffffff'>%1</t>",selectRandom _newsArr], 5] call Epoch_dynamicText;
|
||||
[selectRandom _newsArr, 5] call Epoch_message;
|
@ -10,4 +10,4 @@ if(count _min < 2)then{
|
||||
_min = "0" + _min;
|
||||
};
|
||||
|
||||
[format ["<t size='1.6' color='#99ffffff'>The time is %1:%2.</t>",_hour, _min], 5] call Epoch_dynamicText;
|
||||
[format ["The time is %1:%2.",_hour, _min], 5] call Epoch_message;
|
@ -1,6 +1,6 @@
|
||||
if((random 100) < 6)then{
|
||||
[] execFSM "\x\addons\a3_epoch_code\System\Event_Air_Drop.fsm";
|
||||
["<t size='1.6' color='#99ffffff'>Air Drop Incoming !</t>", 5] call Epoch_dynamicText;
|
||||
["Air Drop Incoming !", 5] call Epoch_message;
|
||||
}else{
|
||||
["<t size='1.6' color='#99ffffff'>Sorry, None Available!</t>", 5] call Epoch_dynamicText;
|
||||
["Sorry, None Available!", 5] call Epoch_message;
|
||||
};
|
@ -15,7 +15,7 @@
|
||||
if !(isNull _this) then {
|
||||
// ignore request if either player is in a vehicle
|
||||
if (vehicle player == player && vehicle _this == _this) then {
|
||||
["<t size='1.6' color='#99ffffff'>Trade request received, press 'T' to accept</t>", 5] call Epoch_dynamicText;
|
||||
["Trade request received, press 'T' to accept", 5] call Epoch_message;
|
||||
EPOCH_pendingP2ptradeTarget = _this;
|
||||
};
|
||||
};
|
||||
|
@ -62,7 +62,7 @@ if (_vehicle == player) then {
|
||||
if (EPOCH_buildMode > 0) then {
|
||||
EPOCH_buildMode = 0;
|
||||
EPOCH_snapDirection = 0;
|
||||
[format["<t size='1.6' color='#99ffffff'>BUILD MODE:%1</t>","DISABLED"], 5] call Epoch_dynamicText;
|
||||
["BUILD MODE: DISABLED", 5] call Epoch_message;
|
||||
EPOCH_Target = objNull;
|
||||
};
|
||||
_increaseStamina = true;
|
||||
|
@ -53,7 +53,7 @@ if (EPOCH_playerEnergy == 0) then {
|
||||
if (EPOCH_buildMode > 0) then {
|
||||
EPOCH_buildMode = 0;
|
||||
EPOCH_snapDirection = 0;
|
||||
["<t size = '1.6' color = '#99ffffff'>Build Mode Disabled: Need Energy< / t>", 5] call Epoch_dynamicText;
|
||||
["Build Mode Disabled: Need Energy", 5] call Epoch_message;
|
||||
EPOCH_Target = objNull;
|
||||
EPOCH_Z_OFFSET = 0;
|
||||
EPOCH_X_OFFSET = 0;
|
||||
|
@ -90,9 +90,9 @@ if !(isNull EPOCH_lastNPCtradeTarget) then {
|
||||
ctrlSetText[41005, (format["%1 Krypto", _cryptoCount])];
|
||||
} else {
|
||||
if (_stockLimit) then{
|
||||
["<t size='1.6' color='#99ffffff'>Trader has the maximum amount of this item</t>", 5] call Epoch_dynamicText;
|
||||
["Trader has the maximum amount of this item", 5] call Epoch_message;
|
||||
} else {
|
||||
["<t size='1.6' color='#99ffffff'>Limit one per trade</t>", 5] call Epoch_dynamicText;
|
||||
["Limit one per trade", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -81,6 +81,6 @@ if (isClass (_config >> _uiItem)) then{
|
||||
};
|
||||
ctrlSetText [41005, (format ["%1 Krypto", _cryptoCount])];
|
||||
} else {
|
||||
["<t size='1.6' color='#99ffffff'>Limit one per trade</t>", 5] call Epoch_dynamicText;
|
||||
["Limit one per trade", 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
|
@ -125,13 +125,10 @@ if (alive _this) then {
|
||||
// SOLD ITEMS ARRAY
|
||||
if !((EPOCH_TRADE_COMPLETE select 0) isEqualTo[]) then {
|
||||
if ((EPOCH_TRADE_COMPLETE select 0) isEqualTo(_this select 0)) then {
|
||||
_errorMsg = 'Items Sold';
|
||||
[format["<t size='1.6' color='#99ffffff'>%1</t>", _errorMsg], 5] call Epoch_dynamicText;
|
||||
|
||||
['Items Sold', 5] call Epoch_message;
|
||||
}
|
||||
else {
|
||||
_errorMsg = 'Failed To Sell Items';
|
||||
[format["<t size='1.6' color='#99ffffff'>%1</t>", _errorMsg], 5] call Epoch_dynamicText;
|
||||
['Failed To Sell Items', 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
|
||||
@ -179,11 +176,10 @@ if (alive _this) then {
|
||||
};
|
||||
} forEach(_this select 1);
|
||||
|
||||
[format["<t size='1.6' color='#99ffffff'>%1</t>", _errorMsg], 5] call Epoch_dynamicText;
|
||||
[_errorMsg, 5] call Epoch_message;
|
||||
}
|
||||
else {
|
||||
_errorMsg = 'Failed To Purchase Items';
|
||||
[format["<t size='1.6' color='#99ffffff'>%1</t>", _errorMsg], 5] call Epoch_dynamicText;
|
||||
['Failed To Purchase Items', 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@ if (!isNull _this) then {
|
||||
if ((typeof _this) == "Land_MPS_EPOCH") then {
|
||||
_getCrypto = _this getVariable["Crypto", 0];
|
||||
[player, Epoch_personalToken, _this] remoteExec ["EPOCH_server_takeCrypto",2];
|
||||
[format["<t size='1.6' color='#99ffffff'>You found %1 Krypto.</t>", _getCrypto], 5] call Epoch_dynamicText;
|
||||
[format["You found %1 Krypto.", _getCrypto], 5] call Epoch_message;
|
||||
};
|
||||
};
|
||||
[] spawn{
|
||||
|
@ -35,7 +35,7 @@ if (getPlayerUID player == Epoch_my_GroupUID) then {
|
||||
};
|
||||
};
|
||||
} else {
|
||||
["<t size='1.6' color='#99ffffff'>You need to select a player!</t>", 5] call Epoch_dynamicText;
|
||||
["You need to select a player!", 5] call Epoch_message;
|
||||
};
|
||||
true
|
||||
} else {
|
||||
|
@ -14,5 +14,5 @@
|
||||
*/
|
||||
if !(_this in Epoch_invited_GroupUIDs) then {
|
||||
Epoch_invited_GroupUIDs pushBack _this;
|
||||
["<t size = ""1.6"" color = ""#99ffffff"">Group request received</t>", 5] call Epoch_dynamicText;
|
||||
["Group request received", 5] call Epoch_message;
|
||||
};
|
||||
|
@ -17,4 +17,4 @@ disableSerialization;
|
||||
if !(Epoch_invited_GroupUIDs isEqualTo[]) exitWith {
|
||||
createDialog "GroupRequests";
|
||||
};
|
||||
["<t size = '1.6' color = '#99ffffff'>No pending requests< / t>", 5] call Epoch_dynamicText;
|
||||
["No pending requests", 5] call Epoch_message;
|
||||
|
147
Sources/epoch_code/gui/scripts/messaging/Epoch_message.sqf
Normal file
147
Sources/epoch_code/gui/scripts/messaging/Epoch_message.sqf
Normal file
@ -0,0 +1,147 @@
|
||||
/*
|
||||
Author: Raimonds Virtoss - EpochMod.com
|
||||
|
||||
Description:
|
||||
Displays custom text message to player
|
||||
|
||||
Licence:
|
||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
||||
|
||||
Github:
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/Epoch_dynamicText.sqf
|
||||
|
||||
Usage:
|
||||
"TEST" call Epoch_message
|
||||
|
||||
TODO: Add colors
|
||||
*/
|
||||
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||
_msg = param [0, "No input"];
|
||||
_time = param [1, 2];
|
||||
|
||||
if !(_msg isEqualType "STRING") then {_msg = str (parseText _msg)};
|
||||
|
||||
if !(isNil "rmx_var_msgQueue") exitWith { rmx_var_msgQueue pushBack [_msg, _time];};
|
||||
|
||||
rmx_var_msgQueue = [[_msg, _time]];
|
||||
|
||||
[] spawn {
|
||||
private ["_c1pos","_c2pos","_c3pos","_clr","_dsp"];
|
||||
|
||||
disableSerialization;
|
||||
|
||||
_dsp = findDisplay 46;
|
||||
|
||||
_yPos = 15;
|
||||
_ySize = 2;
|
||||
_c1StartPos = [safeZoneX,((_yPos - _ySize) * GUI_GRID_H + GUI_GRID_Y),safeZoneW, _ySize * GUI_GRID_H];
|
||||
_c1pos = [safeZoneX,(_yPos * GUI_GRID_H + GUI_GRID_Y),safeZoneW, _ySize * GUI_GRID_H];
|
||||
_c2pos = [safeZoneX,((_yPos + _ySize) * GUI_GRID_H + GUI_GRID_Y),safeZoneW, _ySize * GUI_GRID_H];
|
||||
_c3pos = [safeZoneX,((_yPos + _ySize * 2) * GUI_GRID_H + GUI_GRID_Y),safeZoneW, _ySize * GUI_GRID_H];
|
||||
|
||||
_getClr = call Epoch_getColorScheme;
|
||||
_clr = [_getClr select 0, _getClr select 1, _getClr select 2, 0.2];
|
||||
|
||||
//Start anim
|
||||
_msg = "";
|
||||
_time = (rmx_var_msgQueue select 0 select 1);
|
||||
|
||||
_fnc_animFirst = {
|
||||
private "_ctrl";
|
||||
|
||||
_ctrl = param [0];
|
||||
_msg = param [1];
|
||||
_ctrl ctrlSetBackgroundColor [_clr select 0, _clr select 1, _clr select 2, 0.2];
|
||||
_ctrl ctrlSetText _msg;
|
||||
|
||||
_ctrl ctrlSetPosition _c1StartPos;
|
||||
_ctrl ctrlSetFade 1;
|
||||
_ctrl ctrlCommit 0;
|
||||
|
||||
_ctrl ctrlSetPosition _c1pos;
|
||||
_ctrl ctrlSetFade 0;
|
||||
_ctrl ctrlCommit 0.3;
|
||||
};
|
||||
|
||||
_fnc_animShiftCtrl = {
|
||||
private ["_ctrl", "_fade", "_fontSize", "_pos"];
|
||||
_ctrl = param [0];
|
||||
_fade = param [1];
|
||||
_fontSize = param [2];
|
||||
_pos = param [3];
|
||||
|
||||
_ctrl ctrlSetPosition _pos;
|
||||
_ctrl ctrlSetFontHeight _fontSize;
|
||||
_ctrl ctrlSetFade _fade;
|
||||
_ctrl ctrlCommit 0.3;
|
||||
};
|
||||
|
||||
_tick = diag_tickTime; _ctrlArr = [];
|
||||
while {(diag_tickTime - _tick) < _time} do {
|
||||
|
||||
if !(rmx_var_msgQueue isEqualTo []) then {
|
||||
|
||||
_msg = (rmx_var_msgQueue select 0 select 0);
|
||||
_time = (rmx_var_msgQueue select 0 select 1);
|
||||
_tick = diag_tickTime;
|
||||
rmx_var_msgQueue deleteAt 0;
|
||||
_uniqueID =
|
||||
switch (count _ctrlArr) do {
|
||||
case 0:
|
||||
{
|
||||
_c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC];
|
||||
_ctrlArr = [[_c, _msg]];
|
||||
[_c, _msg] call _fnc_animFirst;
|
||||
};
|
||||
case 1:
|
||||
{
|
||||
_c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC];
|
||||
_ctrlArr set [count _ctrlArr, [_c, _msg]];
|
||||
[_c, _msg] call _fnc_animFirst;
|
||||
|
||||
[_ctrlArr select 0 select 0, 0.5, 0.035, _c2pos] call _fnc_animShiftCtrl;
|
||||
};
|
||||
case 2:
|
||||
{
|
||||
_c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC];
|
||||
_ctrlArr set [count _ctrlArr, [_c, _msg]];
|
||||
[_c, _msg] call _fnc_animFirst;
|
||||
|
||||
[_ctrlArr select 1 select 0, 0.5, 0.035, _c2pos] call _fnc_animShiftCtrl;
|
||||
[_ctrlArr select 0 select 0, 0.75, 0.03, _c3pos] call _fnc_animShiftCtrl;
|
||||
};
|
||||
case 3:
|
||||
{
|
||||
_oldCtrl = (_ctrlArr select 0 select 0);
|
||||
[_oldCtrl] call epoch_getIDC;
|
||||
ctrlDelete _oldCtrl;
|
||||
_ctrlArr deleteAt 0;
|
||||
|
||||
_c = _dsp ctrlCreate ["rmx_t1", call epoch_getIDC];
|
||||
_ctrlArr pushBack [_c, _msg];
|
||||
[_c, _msg] call _fnc_animFirst;
|
||||
|
||||
[_ctrlArr select 1 select 0, 0.5, 0.035, _c2pos] call _fnc_animShiftCtrl;
|
||||
[_ctrlArr select 0 select 0, 0.75, 0.03, _c3pos] call _fnc_animShiftCtrl;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//End anim
|
||||
{
|
||||
(_x select 0) ctrlSetFade 1;
|
||||
(_x select 0) ctrlSetPosition [safeZoneX, ((_yPos + _ySize * (_forEachIndex + 1)) * GUI_GRID_H + GUI_GRID_Y)];
|
||||
(_x select 0) ctrlCommit (0.4 - ((_foreachIndex + 1) / 10));
|
||||
} forEach _ctrlArr;
|
||||
|
||||
uisleep 0.50;
|
||||
|
||||
{
|
||||
ctrlDelete (_x select 0);
|
||||
} forEach _ctrlArr;
|
||||
|
||||
rmx_var_msgQueue = nil;
|
||||
};
|
||||
|
||||
true
|
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/Epoch_dynamicText.sqf
|
||||
|
||||
Usage:
|
||||
"TEST" call Epoch_dynamicText
|
||||
"TEST" call Epoch_message_old1
|
||||
*/
|
||||
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||
private ["_y","_cnt","_ctrl","_alreadyEnabled","_input","_scale","_width","_height","_centerX","_centerY","_display","_ctrlGroup","_controls","_ctrlText","_add"];
|
@ -11,7 +11,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/gui/scripts/Epoch_dynamicText.sqf
|
||||
|
||||
Usage:
|
||||
"TEST" call Epoch_dynamicText
|
||||
"TEST" call Epoch_message_old2
|
||||
*/
|
||||
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||
|
||||
@ -75,7 +75,7 @@ rmx_var_dtMessageArr pushBack [_in, _timer];
|
||||
_cnt = 0;
|
||||
|
||||
{
|
||||
_ct = if (_x in [65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90]) then {0.8} else {0.3};
|
||||
_ct = if (_x in [65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90]) then {1} else {0.5};
|
||||
_cnt = _cnt +_ct;
|
||||
} count (toArray str _in);
|
||||
|
@ -153,6 +153,11 @@ class CfgClientFunctions
|
||||
class initUI {};
|
||||
class refeshUI {};
|
||||
};
|
||||
class messaging {
|
||||
class message {};
|
||||
class message_old1 {};
|
||||
class message_old2 {};
|
||||
};
|
||||
class looting {
|
||||
class spawnLoot {};
|
||||
};
|
||||
@ -168,7 +173,6 @@ class CfgClientFunctions
|
||||
class getIDC {};
|
||||
class guiObjHP {};
|
||||
class secureStorageHandler {};
|
||||
class dynamicText {};
|
||||
class genderSelection {};
|
||||
class getColorScheme {};
|
||||
};
|
||||
|
@ -78,7 +78,7 @@ class doDelivery{
|
||||
callEventCondition1 = "(axeDocDeliveryStart + 480 < diag_tickTime) && ((player nearentities [[""C_Man_1""],500]) apply {_x getVariable [""AI_SLOT"",-1]} isEqualTo (uiNameSpace getVariable [""axeStartTraders"",[]]))";
|
||||
callEventCondition2 = "";
|
||||
callEventCondition3 = "";
|
||||
callEventCALL1 = "[""<t size='1.6' color='#99ffffff'>Hey, what are you doing here ? Get on with your task !</t>"", 5] call Epoch_dynamicText";
|
||||
callEventCALL1 = "[""Hey, what are you doing here ? Get on with your task !"", 5] call Epoch_message";
|
||||
callEventFSM1 = "";
|
||||
callEventSQF1 = "";
|
||||
callEventTask1 = "";
|
||||
|
@ -197,7 +197,7 @@ class milFindCrashSite{
|
||||
callEventCondition1 = "count (units group player select {_x distance milCrashPos < 800}) > 0";
|
||||
callEventCondition2 = "count (units group player select {_x distance milCrashPos < 480}) > 0 && random 100 < 12";
|
||||
callEventCondition3 = "";
|
||||
callEventCALL1 = "_diag = format [""Great work the UAV has spotted %1 nearly on-site."",name ((units group player select {_x distance milCrashPos < 800}) select 0)];[format [""<t size='1.6' color='#99ffffff'>%1</t>"",_diag], 5] call Epoch_dynamicText;";
|
||||
callEventCALL1 = "_diag = format [""Great work the UAV has spotted %1 nearly on-site."",name ((units group player select {_x distance milCrashPos < 800}) select 0)];[_diag, 5] call Epoch_message;";
|
||||
callEventFSM1 = "";
|
||||
callEventSQF1 = "";
|
||||
callEventTask1 = "";
|
||||
|
Loading…
Reference in New Issue
Block a user