|
发表于 2013-9-14 15:35:03
|
显示全部楼层
多重以上的组合键我们需要至少两个或两个以上的变量判断值从而可以激活判定。BI KEY CODE所有的定义都是单键的,所以我们需要keyDown和KeyUp两个control组合使用,比如说我们需要同时按住right shift + P给玩家加满弹药,写法如下:- conl_P = false;
- conl_shift = false;
- _eh = (findDisplay 46) displayAddEventHandler ["Keydown", "if ((_this select 1) == 25) then {conl_P = true};"];
- _eh = (findDisplay 46) displayAddEventHandler ["KeyUp", "if ((_this select 1) == 25) then {conl_P = false};"];
- _eh = (findDisplay 46) displayAddEventHandler ["Keydown", "if ((_this select 1) == 54) then {conl_shift = true};"];
- _eh = (findDisplay 46) displayAddEventHandler ["KeyUp", "if ((_this select 1) == 54) then {conl_shift = false};"];
复制代码- waitUntil {conl_P&&conl_shift}
- player setvehicleammo 1
复制代码 |
|