mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
final code conversions, esc to exit
This commit is contained in:
parent
e3c94821a2
commit
96f3791855
@ -1,4 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
#include "\z\ace\addons\arsenal\defines.hpp"
|
||||
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
|
||||
|
||||
enableSaving [false, false];
|
||||
cba_diagnostic_projectileMaxLines = 10;
|
||||
@ -29,6 +31,35 @@ cba_diagnostic_projectileMaxLines = 10;
|
||||
|
||||
_player call CBA_fnc_removeUnitTrackProjectiles;
|
||||
_player setFatigue 0;
|
||||
|
||||
// Esc to close mission
|
||||
{
|
||||
private _display = findDisplay IDD_ace_arsenal;
|
||||
|
||||
_display displayAddEventHandler ["KeyDown", {
|
||||
params ["_display", "_key", "_shift"];
|
||||
|
||||
if (_key isEqualTo DIK_ESCAPE && {!_shift}) then {
|
||||
[_display] spawn {
|
||||
disableSerialization;
|
||||
params ["_display"];
|
||||
|
||||
private _return = [
|
||||
localize "str_a3_rscdisplaymain_buttonexit",
|
||||
localize "str_sure",
|
||||
true, false,
|
||||
_display, false, true
|
||||
] call BIS_fnc_GUImessage;
|
||||
|
||||
if (_return) then {
|
||||
_display closeDisplay 2;
|
||||
findDisplay 46 closeDisplay 0;
|
||||
};
|
||||
};
|
||||
true
|
||||
};
|
||||
}];
|
||||
} call CBA_fnc_execNextFrame;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(displayClosed), {
|
||||
|
@ -4,6 +4,8 @@ params ["_display"];
|
||||
|
||||
private _ctrlButtonAbort = _display displayCtrl 104;
|
||||
_ctrlButtonAbort ctrlSetText localize LSTRING(Mission);
|
||||
_ctrlButtonAbort ctrlSetTooltip localize LSTRING(ReturnToArsenal);
|
||||
|
||||
_ctrlButtonAbort ctrlSetEventHandler ["ButtonClick", {
|
||||
params ["_control"];
|
||||
ctrlParent _control closeDisplay 2;
|
||||
|
@ -54,55 +54,54 @@ for "_i" from 0 to 1 do {
|
||||
_target setSpeedMode "LIMITED";
|
||||
};
|
||||
|
||||
/*
|
||||
//--- Armored vehicles
|
||||
_vehicles = [];
|
||||
if (isclass (configfile >> "cfgvehicles" >> "Land_VR_Target_MRAP_01_F")) then {
|
||||
_step = 15;
|
||||
_positionCenter = [position _unit select 0,(position _unit select 1) + 30,0];
|
||||
private _vehicles = [];
|
||||
|
||||
private _step = 15;
|
||||
_position = [position _unit select 0,(position _unit select 1) + 30,0];
|
||||
|
||||
{
|
||||
private _row = _forEachIndex;
|
||||
private _rowCount = (count _x - 1) * 0.5;
|
||||
|
||||
{
|
||||
_row = _foreachindex;
|
||||
_rowCount = (count _x - 1) * 0.5;
|
||||
{
|
||||
_position = [
|
||||
(_positionCenter select 0) + (-_rowCount + _foreachindex) * _step,
|
||||
(_positionCenter select 1) + _row * _step,
|
||||
0
|
||||
];
|
||||
_veh = createvehicle [_x,_position,[],0,"none"];
|
||||
_veh setpos _position;
|
||||
_veh setdir 180;
|
||||
_veh setvelocity [0,0,-1];
|
||||
[_veh] call bis_fnc_VRHitpart;
|
||||
_marker = _veh call bis_fnc_boundingboxmarker;
|
||||
_marker setmarkercolor "colororange";
|
||||
_vehicles pushback _veh;
|
||||
} foreach _x;
|
||||
} foreach [
|
||||
[
|
||||
"Land_VR_Target_MRAP_01_F",
|
||||
"Land_VR_Target_APC_Wheeled_01_F",
|
||||
"Land_VR_Target_MBT_01_cannon_F"
|
||||
],
|
||||
[
|
||||
"Land_VR_Target_MRAP_01_F",
|
||||
"Land_VR_Target_APC_Wheeled_01_F",
|
||||
"Land_VR_Target_MBT_01_cannon_F"
|
||||
]
|
||||
];
|
||||
};
|
||||
private _position = _position vectorAdd [(-_rowCount + _forEachIndex) * _step, _row * _step, 0];
|
||||
|
||||
private _vehicle = createVehicle [_x, _position, [], 0, "NONE"];
|
||||
_vehicle setPos _position;
|
||||
_vehicle setDir 180;
|
||||
_vehicle setVelocity [0,0,-1];
|
||||
_vehicle call BIS_fnc_VRHitpart;
|
||||
|
||||
private _marker = _vehicle call BIS_fnc_boundingBoxMarker;
|
||||
_marker setMarkerColor "ColorOrange";
|
||||
_vehicles pushBack _vehicle;
|
||||
} forEach _x;
|
||||
} forEach [[
|
||||
"Land_VR_Target_MRAP_01_F",
|
||||
"Land_VR_Target_APC_Wheeled_01_F",
|
||||
"Land_VR_Target_MBT_01_cannon_F"
|
||||
], [
|
||||
"Land_VR_Target_MRAP_01_F",
|
||||
"Land_VR_Target_APC_Wheeled_01_F",
|
||||
"Land_VR_Target_MBT_01_cannon_F"
|
||||
]];
|
||||
|
||||
_vehicles spawn {
|
||||
waituntil {
|
||||
_allDisabled = true;
|
||||
private _allDisabled = true;
|
||||
|
||||
{
|
||||
_hitalive = _x getvariable ["bis_fnc_VRHitParts_hitalive",[]];
|
||||
_allDisabled = _allDisabled && ({!_x} count _hitalive >= 2);
|
||||
_hitAlive = _x getVariable ["bis_fnc_VRHitParts_hitalive", []];
|
||||
_allDisabled = _allDisabled && ({!_x} count _hitAlive >= 2);
|
||||
sleep 0.1;
|
||||
} foreach _this;
|
||||
} forEach _this;
|
||||
|
||||
_allDisabled
|
||||
};
|
||||
setstatvalue ["MarkMassVirtualDestruction",1];
|
||||
};*/
|
||||
|
||||
setStatValue ["MarkMassVirtualDestruction", 1];
|
||||
};
|
||||
|
||||
//--- Cover objects
|
||||
private _coverObjects = [
|
||||
@ -149,20 +148,22 @@ _unit addEventHandler ["AnimChanged", {
|
||||
["#(argb,8,8,3)color(0,0,0,1)", false, nil, 0.1, [0,0.5]] spawn BIS_fnc_textTiles;
|
||||
|
||||
//--- Target markers
|
||||
/*[] spawn {
|
||||
_targets = [];
|
||||
{
|
||||
_targets pushback vehiclevarname _x;
|
||||
_var = vehiclevarname _x;
|
||||
_marker = createmarker [_var,position _x];
|
||||
_marker setmarkertype "mil_dot";
|
||||
_marker setmarkercolor "colororange";
|
||||
} foreach (allmissionobjects "man") - [player];
|
||||
while {true} do {
|
||||
private _markers = [];
|
||||
|
||||
{
|
||||
private _marker = createMarker [vehicleVarName _x, position _x];
|
||||
_marker setMarkerType "mil_dot";
|
||||
_marker setMarkerColor "ColorOrange";
|
||||
|
||||
_markers pushBack _marker;
|
||||
} forEach (allMissionObjects "CAManBase" - [_unit]);
|
||||
|
||||
_markers spawn {
|
||||
while {true} do {
|
||||
{
|
||||
_t = missionnamespace getvariable _x;
|
||||
(vehiclevarname _t) setmarkerpos position _t;
|
||||
} foreach _targets;
|
||||
private _target = missionNamespace getVariable _x;
|
||||
_x setMarkerPos position _target;
|
||||
} forEach _this;
|
||||
sleep 0.1;
|
||||
};
|
||||
};
|
||||
|
@ -434,16 +434,18 @@
|
||||
<Japanese>ACE 武器庫を開けません</Japanese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_Mission">
|
||||
<English>ACE Virtual Arsenal</English>
|
||||
<German>ACE Virtuelles Arsenal</German>
|
||||
<English>ACE Arsenal</English>
|
||||
<German>ACE-Arsenal</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_ReturnToArsenal">
|
||||
<English>Return to ACE Arsenal.</English>
|
||||
<German>Zurück zum ACE-Arsenal.</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_Mission_tooltip">
|
||||
<English>View and try out different weapons, equipment and vehicles.</English>
|
||||
<German>Sieh dir verschiedene Waffen, Ausrüstung und Fahrzeuge an und probiere sie aus.</German>
|
||||
<English>Not as bad as the regular one.</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_Mission_overview">
|
||||
<English>View and try out different weapons, equipment and vehicles.</English>
|
||||
<German>Sieh dir verschiedene Waffen, Ausrüstung und Fahrzeuge an und probiere sie aus.</German>
|
||||
<English>Dress up simulator loading in progress...</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user