|
马上注册领取绝版勋章
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 暗影夜刺 于 2019-4-3 20:24 编辑
作者:Pierre MGI
标签:未授权
此脚本是为UNSUNG DELTA mod制作的,并与TFAR无线电一起使用。您可以在修改无线电类阵列时轻松调整它。您甚至可以决定通过库存中的简单无线电提供支持。在init.sqf中,这需要更改赋给了项目的任何背包考虑因素。重要!:命名模块请求者(这里REQ),(虚拟或真实支持提供商,这里CAS1,arty1,drop1)
in init.sqf:
- MGI_radios = ["UNS_alice_FR","UNS_USMC_RTO","UNS_USMC_RTO2","UNS_ARMY_RTO","UNS_ARMY_RTO2","UNS_SF_RTO"];
-
- MGI_fnc_radioSupport = compileFinal preprocessFileLineNumbers "MGI_fnc_radioSupport.sqf";
- player spawn MGI_fnc_radioSupport; // the code for RTO
- player addMPEventHandler ["MPRespawn",{(_this select 0) spawn MGI_fnc_radioSupport}]; // for respawn loop
-
- addMissionEventHandler ["teamSwitch", { // like for tasks, but in this case, SP team switch is one of the toughest thing to make it work! to be tested deeper...
- params ["_ancient","_newbie"];
- [req,_ancient] call BIS_fnc_removeSupportLink;
- _newbie spawn MGI_fnc_radioSupport;
- BIS_requesterFSM = nil;
- [req] execVM "A3\modules_f\supports\init_requester.sqf";
- [drop1] execVM "A3\modules_f\supports\init_provider_virtual.sqf";
- [cas1] execVM "A3\modules_f\supports\init_provider_virtual.sqf";
- [arty1] execVM "A3\modules_f\supports\init_provider_virtual.sqf";
- call BIS_SUPP_refreshMainWindow;
- }];
复制代码 The script MGI_fnc_radioSupport.sqf :
- _plyr = _this;
- _plyr spawn {
-
- _unit = _this;
- while {alive _unit} do {
- waituntil {sleep 2; (backpack _unit in MGI_radios or (backpack _unit) isKindOf "TFAR_bag_base")}; // TFAR_bag_base is case of TFAR mod present
- [_unit,req,cas1] call BIS_fnc_addSupportLink;
- [_unit,req,drop1] call BIS_fnc_addSupportLink;
- [_unit,req,arty1] call BIS_fnc_addSupportLink;
-
- waituntil {sleep 2; (!(backpack _unit in MGI_radios) && !((backpack _unit) isKindOf "TFAR_bag_base"))};
- [req,_unit] call BIS_fnc_removeSupportLink;
- };
- };
复制代码
|
|