T-72Б › Среда
› 29.07.2015
› 11:24
› Сообщение # 3
Генерал-майор
В увольнительной
- Группа:
- Пользователи
- Сообщений:
- 411
т.е. такой скрипт
Код I=60;
waituntil {time > 1};
/// функция вызываемая при нажатии клавиш keyspressed = { private["_key","_exit"]; _key = _this select 1;
/// переменная может понадобиться для работы функции //_exit = false;
/// T if (_key == 20) then { /// создать копию if (time - lasttime < 60) exitWith {}; /// задержка на нажатие lasttime = time; I=time;
_BoecThingSpawn = {
_side = createCenter east; _groupThing = createGroup east; _MolThing = _groupThing createUnit ["ModuleLightning_F", [0, 0, 0], [], 0, "NONE"]; _MolThing setpos getPos player; sleep 1; _BoecThing = _groupThing createUnit ["B_Soldier_F", [0, 0, 0], [], 0, "NONE"]; _BoecThing setpos getPos player; _BoecThing setdir getdir player; _BoecThing setunitpos "up"; _BoecThing setcaptive true; dostop _BoecThing; sleep 60; _MolThing = _groupThing createUnit ["ModuleLightning_F", [0, 0, 0], [], 0, "NONE"]; _MolThing setpos getPos _BoecThing; deletevehicle _BoecThing; };
[] spawn _BoecThingSpawn;
};
/// N if (_key == 49) then {
/// Обнаружить игроков if (time - lasttime < 60) exitWith {}; /// задержка на нажатие lasttime = time; I=time;
_VizionThingSpawn = { MEH_Index_1 = addMissionEventHandler [ "Draw3D", { { drawIcon3D [ "\A3\ui_f\data\Map\MapControl\bush_ca.paa", [1,0,0,1], position _x, 1, 1, 0, name _x, 2, 0.03, "PuristaSemiBold" ]; } forEach allplayers } ];
_markRadio = createMarkerLocal ["markerRadio", position radio]; _markRadio setMarkerShapeLocal "ICON"; _markRadio setMarkerTypeLocal "mil_destroy"; _markRadio setMarkerColorLocal "ColorRED";
_markRadio1 = createMarkerLocal ["markerRadio1", position radio1]; _markRadio1 setMarkerShapeLocal "ICON"; _markRadio1 setMarkerTypeLocal "mil_destroy"; _markRadio1 setMarkerColorLocal "ColorRED";
_markRadio2 = createMarkerLocal ["markerRadio2", position radio2]; _markRadio2 setMarkerShapeLocal "ICON"; _markRadio2 setMarkerTypeLocal "mil_destroy"; _markRadio2 setMarkerColorLocal "ColorRED";
_markRadiocar = createMarkerLocal ["markerRadiocar", position radiocar]; _markRadiocar setMarkerShapeLocal "ICON"; _markRadiocar setMarkerTypeLocal "mil_destroy"; _markRadiocar setMarkerColorLocal "ColorRED";
sleep 15; removeMissionEventHandler ["Draw3D", 0]; deleteMarkerLocal _markRadio; deleteMarkerLocal _markRadio1; deleteMarkerLocal _markRadio2; deleteMarkerLocal _markRadiocar; };
[] spawn _VizionThingSpawn;
};
/// Space
if (_key == 57) then { /// прыжки (Space) if (time - lasttime < 5) exitWith {}; /// задержка на нажатие lasttime = time; I=time; playSound3D [ MISSION_ROOT + "sound\clone.wav" , player ] ; player setvelocity [sin(getdir player)*5,cos(getdir player)*5, 10];
};
/// B
if (_key == 48) then { /// телепорт по карте (B) if (time - lasttime < 60) exitWith {}; /// задержка на нажатие lasttime = time; I=time;
onMapSingleClick " player setpos _pos; playSound3D [ MISSION_ROOT + 'sound\teleport.wav' , player ] ; onMapSingleClick '',true";
};
/// C
if (_key == 46) then { /// телепорт (C) if (time - lasttime < 30) exitWith {}; /// задержка на нажатие lasttime = time; I=time;
crPlow attachto [player,[0,15,0]]; detach crPlow; playSound3D [ MISSION_ROOT + 'sound\teleport.wav' , player ] ; player setpos getpos crPlow;
};
/// R if (_key == 19) then { /// спавн клонов (R) if (time - lasttime < 30) exitWith {}; /// задержка на нажатие lasttime = time; I=time;
crPlow attachto [player,[0,15,0]]; detach crPlow;
_ManThingSpawn = {
_side = createCenter civilian; _groupThing = createGroup civilian; _manThings = []; _dirs = [0, 45, 90, 130, 180, 225, 270, 325]; _mol="ModuleLightning_F" createUnit [getpos crPlow, group igcam]; sleep 1; for "_i" from 0 to 7 do { _manThing = _groupThing createUnit ["C_scientist_F", [0, 0, 0], [], 0, "NONE"]; _manThing setpos getPos crPlow; _manThing setdir (_dirs select _i); _manThing setunitpos "up"; _manThing disableAI "anim"; _manThing switchmove "AmovPercMrunSnonWnonDf"; _manThings pushBack _manThing; }; sleep 8; _dirs = [0, 225, 270, 325, 0, 45, 90, 135]; { if !(isNull _x) then { _x setdir (_dirs select _forEachIndex); }; } foreach _manThings; sleep 10; _mol1="ModuleLightning_F" createUnit [getpos crPlow, group igcam]; { if !(isNull _x) then { deletevehicle _x; }; } foreach _manThings; };
[] spawn _ManThingSpawn;
};
/// H if (_key == 33) then { /// быстрая атака (F) if (time - lasttime < 1.5) exitWith {}; /// задержка на нажатие lasttime = time; I=time;
playSound3D [ MISSION_ROOT + "sound\ydar.wav" , player ] ; player switchmove 'AwopPercMstpSgthWnonDnon_end';
_pul9= createVehicle ['B_127x108_APDS', getPos player, [], 0, 'none']; _pul9 setpos [getpos _pul9 select 0, getpos _pul9 select 1, (getpos _pul9 select 2) + 3]; _pul9 setvelocity [sin(getdir player)*500,cos(getdir player)*500, -750]; };
/// G if (_key == 34) then { /// дым (G) if (time - lasttime < 60) exitWith {}; /// задержка на нажатие lasttime = time; I=time;
playSound3D [ MISSION_ROOT + "sound\fog.wav" , player ] ; _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _soundToPlay = _soundPath + "Sound\fog.ogg"; playSound3D [_soundToPlay, player];
_pul9S= createVehicle ["Smoke_120mm_AMOS_White", getPos player, [], 0, 'none']; _pul9S attachto [player,[0,15,0]]; _pul9S setvelocity [0,0,-1]; detach _pul9S;
/// квадрат
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9 select 0) +5 , (getpos _pul9 select 1) +5, (getpos _pul9 select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9S, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9 select 0) -5 , (getpos _pul9 select 1) -5, (getpos _pul9 select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9 select 0) -5 , (getpos _pul9 select 1) +5, (getpos _pul9 select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9 select 0) +5 , (getpos _pul9 select 1) -5, (getpos _pul9 select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9S select 0) +5 , (getpos _pul9S select 1) + 0, (getpos _pul9S select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9S select 0) -5 , (getpos _pul9S select 1) + 0, (getpos _pul9S select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9S select 0) +0 , (getpos _pul9S select 1) + 5, (getpos _pul9S select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9S select 0) +0 , (getpos _pul9S select 1) - 5, (getpos _pul9S select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
/// большой квадрат
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9 select 0) +15 , (getpos _pul9 select 1) +15, (getpos _pul9 select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9 select 0) -15 , (getpos _pul9 select 1) -15, (getpos _pul9 select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9 select 0) -15 , (getpos _pul9 select 1) +15, (getpos _pul9 select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
_pul9= createVehicle ['Smoke_120mm_AMOS_White', getPos _pul9S, [], 0, 'none']; _pul9 setpos [(getpos _pul9 select 0) +15 , (getpos _pul9 select 1) -15, (getpos _pul9 select 2) + 0]; _pul9 setvelocity [0,0,-1]; _molYDAR="ModuleLightning_F" createUnit [getpos _pul9, group igcam];
}; };
/// создаём дисплей нажатия клавиатуры с ярлыком - EH_keyDown EH_keyDown = (findDisplay 46) displayAddEventHandler ["keyDown", "_this call keyspressed"]; никак не получится в конфиг запихать?
|