用脚本怎样才能做出轰炸机地毯式轰炸,炸弹从机腹倾泄而下
arma3吧
全部回复
仅看楼主
level 10
还有战斗机与直升机飞到接近目标上空时对实时指示目标或一开始预定目标首先用几种导弹轮番接连攻击,打光后改用火箭巢无差别打击,射完后又用机炮火力覆盖,最后还不忘释放烟雾弹和干扰箔条,意思就是要让火力单位到达目的地后,先用主武器打完后改用副武器,以此类推,直至机上没有任何一种主动与被动武器,
2021年05月07日 01点05分 1
level 10
不管这个攻击点是敌方装甲还是人员,再或者是地图上的空建筑与地图上任意一处空地都无条件执行攻击,不过这个条件已解决,就还有上面的效果还没实现,求大佬指点
2021年05月07日 02点05分 2
level 10
有这种大规模地毯式轰炸的轰炸机叫啥名,好像这游戏没有B52,B1的类似的战略轰炸机
2021年05月07日 02点05分 3
level 10
着急呀吧友们
2021年05月07日 07点05分 4
level 13
毛子的图95[滑稽]
2021年05月07日 08点05分 5
我试了图95,图160似乎都没办法让它们地毯式轰炸,是不是它们跟本没装备这么多的炸弹啊
2021年05月07日 09点05分
@不离不弃这闪点 弹药通过代码改成无限呗
2021年05月07日 10点05分
正确的让它攻击目标的语句如何写?
2021年05月07日 11点05分
@不离不弃这闪点 直接路点+触发器,算好落点。可以参考黑暗之潮,人家就这样搞的
2021年05月07日 11点05分
level 10
还是我的让它们轰炸的语句有误啊,该如何正确写?
2021年05月07日 09点05分 6
level 10
脚本大神们就这么惜口如金吗?[汗]
2021年05月08日 07点05分 8
level 10
看来这问题非常有难度,连脚本大神都束手无策了,很有挑战性
2021年05月08日 22点05分 9
level 10
想了笨办法解决它,以A10雷电战机为例,脚本如下【openmap true;hint parseText format["<br/>--------------------------<br/> <br/><t size='2.4' color='#33CC00'>在地图上点击来确定你的目标点</t><br/><br/>--------------------------<br/>"]; click=0;["gongji","onmapsingleclick",{shengcheng = "Land_HelipadEmpty_F"createvehicle _pos;ATarget setpos _pos;click =1;["gongji","onmapsingleclick"] call BIS_fnc_removestackedeventhandler;
}] call BIS_fnc_addstackedeventhandler;waituntil {click ==1};"firepoint"setmarkerpos getpos ATarget;["GOGOGO","我们的航空母舰在哪里"] call bis_fnc_showsubtitle;sleep 3;
sleep 0.5;openmap false;_need=3;_countf=0;while{_countf<_need}do{_dropposition = getmarkerpos "firepoint";_len = round (random 1800) ;_dir = round (random 360) ;_height=4000;//_plane=["B_Plane_CAS_01_dynamicLoadout_F","B_Plane_Fighter_01_Stealth_F","O_Plane_Fighter_02_Stealth_F","O_Plane_CAS_02_dynamicLoadout_F","Su39","Su34","An2_TK_EP1","L39_TK_EP1","fantry_dynamicLoadout_F"," I_C_Plane_Civil_01_F","I_Plane_Fighter_03_dynamicLoadout_F","B_UAV_01_F","CUP_B_MV22_USMC_RAMPGUN","MQ9PredatorB","pook_MIG29_OPFOR","pook_IL76_IDAP","F16_B52","C130J","pook_SU30_BLUFOR","A10_US_EP1","AV8B","rhsusf_f22","F35B","ITC_F181E","pook_SU27_OPFOR","pook_tu95_OPFOR","I_Plane_Fighter_04_F"]call BIS_fnc_selectRandom;_tarpos=[(_dropPosition select 0)-(_len*sin(_dir)), (_dropPosition select 1)-(_len*cos(_dir)), (_dropPosition select 2)+(_height)];
//_veh = _plane createVehicle _tarpos;_veh = createVehicle ["B_Plane_CAS_01_dynamicLoadout_F", _tarpos, [], 0, "FLY"];//["a10",cket_04_HE_Plane_CAS_01_F","Missile_AGM_02_Plane_CAS_01_F","Bomb_04_Plane_CAS_01_F","Rocket_04_AP_Plane_CAS_01_F"]]//_veh = createVehicle [_plane, _tarpos, [], 0, "FLY"];_grp = createVehicleCrew _veh;//_unit = _grp createUnit [typeOf driver _veh, _grp, [], 0, "cargo"];_veh flyinheight 4000;_veh setVelocity [200,0,0];_veh setVelocityModelSpace [0, 200, 0];_veh setSpeedMode"full";
//_veh setVelocityModelSpace [0, 10, 0];sleep 1;[_grp,_veh] domove getpos player;[_grp, 2] setWaypointType "cycle";_veh selectweapon"Missile_AGM_02_Plane_CAS_01_F";sleep 20;while {_veh ammo "Missile_AGM_02_Plane_CAS_01_F" > 0;} do { [_veh, "Missile_AGM_02_Plane_CAS_01_F"] call BIS_fnc_fire; // sleep 0.1;};sleep 15;
waitUntil { _veh ammo "Missile_AGM_02_Plane_CAS_01_F" == 0; };if ((weapons _veh) find "Bomb_04_Plane_CAS_01_F" >= 0) then { for "_i" from 0 to 20 do { sleep 0.5; [_veh, "Bomb_04_Plane_CAS_01_F"] call BIS_fnc_fire; };};sleep 15;waitUntil { _veh ammo "Bomb_04_Plane_CAS_01_F" == 0; };if ((weapons _veh) find "Rocket_04_AP_Plane_CAS_01_F" >= 0) then { for "_i" from 0 to 20 do { sleep 0.5; [_veh, "Rocket_04_AP_Plane_CAS_01_F"] call BIS_fnc_fire; //t="CBA_O_InvisibleTarget" createVehicle [0,0,0];addMissionEventHandler ["MapSingleClick", { // params ["_units", "_pos", "_alt", "_shift"]; hint str _pos;t setpos _pos; {_x doWatch t;_x doTarget t;_x doSuppressiveFire t;}forEach allunits;}];};};sleep 15;waitUntil { _veh ammo "Rocket_04_AP_Plane_CAS_01_F" == 0; };if ((weapons _veh) find "cket_04_HE_Plane_CAS_01_F" >= 0) then { for "_i" from 0 to 20 do { sleep 0.5; [_veh, "cket_04_HE_Plane_CAS_01_F"] call BIS_fnc_fire; }; };};】这次这样设置后它就按顺序打光武器前面的就接着打后面的了,
2021年05月21日 14点05分 11
level 10
2021年05月21日 14点05分 12
level 10
不过现在不知道如何让它无限弹药,意思就是打完所有的弹药后就又全部设为满弹了
2021年05月21日 14点05分 13
level 10
https://www.bilibili.com/video/BV1v44y1r73E/】这是视频测试效果,不过不知咋的最后 的机炮它没有使用,另外那个火箭弹为何只发射左边的,而右边的没发射
2021年05月22日 06点05分 14
level 10
openmap true;hint parseText format["<br/>--------------------------<br/> <br/><t size='2.4' color='#33CC00'>在地图上点击来确定你的目标点</t><br/><br/>--------------------------<br/>"]; click=0;["gongji","onmapsingleclick",{shengcheng = "Land_HelipadEmpty_F"createvehicle _pos;ATarget setpos _pos;click =1;["gongji","onmapsingleclick"] call BIS_fnc_removestackedeventhandler;
}] call BIS_fnc_addstackedeventhandler;waituntil {click ==1};"firepoint"setmarkerpos getpos ATarget;["GOGOGO","我们的航空母舰在哪里"] call bis_fnc_showsubtitle;sleep 3;
sleep 0.5;openmap false;_need=3;_countf=0;while{_countf<_need}do{_dropposition = getmarkerpos "firepoint";_len = round (random 1800) ;_dir = round (random 360) ;_height=4000;//_plane=["B_Plane_CAS_01_dynamicLoadout_F","B_Plane_Fighter_01_Stealth_F","O_Plane_Fighter_02_Stealth_F","O_Plane_CAS_02_dynamicLoadout_F","Su39","Su34","An2_TK_EP1","L39_TK_EP1","fantry_dynamicLoadout_F"," I_C_Plane_Civil_01_F","I_Plane_Fighter_03_dynamicLoadout_F","B_UAV_01_F","CUP_B_MV22_USMC_RAMPGUN","MQ9PredatorB","pook_MIG29_OPFOR","pook_IL76_IDAP","F16_B52","C130J","pook_SU30_BLUFOR","A10_US_EP1","AV8B","rhsusf_f22","F35B","ITC_F181E","pook_SU27_OPFOR","pook_tu95_OPFOR","I_Plane_Fighter_04_F"]call BIS_fnc_selectRandom;_tarpos=[(_dropPosition select 0)-(_len*sin(_dir)), (_dropPosition select 1)-(_len*cos(_dir)), (_dropPosition select 2)+(_height)];
//_veh = _plane createVehicle _tarpos;_veh = createVehicle ["B_Plane_CAS_01_dynamicLoadout_F", _tarpos, [], 0, "FLY"];//["a10",cket_04_HE_Plane_CAS_01_F","Missile_AGM_02_Plane_CAS_01_F","Bomb_04_Plane_CAS_01_F","Rocket_04_AP_Plane_CAS_01_F"]]//_veh = createVehicle [_plane, _tarpos, [], 0, "FLY"];_grp = createVehicleCrew _veh;//_unit = _grp createUnit [typeOf driver _veh, _grp, [], 0, "cargo"];_veh flyinheight 4000;_veh setVelocity [200,0,0];_veh setVelocityModelSpace [0, 200, 0];_veh setSpeedMode"full";
//_veh setVelocityModelSpace [0, 10, 0];sleep 1;[_grp,_veh] domove getpos player;[_grp, 2] setWaypointType "cycle";_veh selectweapon"Missile_AGM_02_Plane_CAS_01_F";sleep 20;while {_veh ammo "Missile_AGM_02_Plane_CAS_01_F" > 0;} do { [_veh, "Missile_AGM_02_Plane_CAS_01_F"] call BIS_fnc_fire; // sleep 0.1;};sleep 15;
waitUntil { _veh ammo "Missile_AGM_02_Plane_CAS_01_F" == 0; };if ((weapons _veh) find "Bomb_04_Plane_CAS_01_F" >= 0) then { for "_i" from 0 to 20 do { sleep 0.5; [_veh, "Bomb_04_Plane_CAS_01_F"] call BIS_fnc_fire; };};sleep 15;waitUntil { _veh ammo "Bomb_04_Plane_CAS_01_F" == 0; };if ((weapons _veh) find "Rocket_04_AP_Plane_CAS_01_F" >= 0) then { for "_i" from 0 to 20 do { sleep 0.5; [_veh, "Rocket_04_AP_Plane_CAS_01_F"] call BIS_fnc_fire; //t="CBA_O_InvisibleTarget" createVehicle [0,0,0];addMissionEventHandler ["MapSingleClick", { // params ["_units", "_pos", "_alt", "_shift"]; hint str _pos;t setpos _pos; {_x doWatch t;_x doTarget t;_x doSuppressiveFire t;}forEach allunits;}];};};sleep 15;waitUntil { _veh ammo "Rocket_04_AP_Plane_CAS_01_F" == 0; };if ((weapons _veh) find "Missile_AA_04_Plane_CAS_01_F" >= 0) then { for "_i" from 0 to 20 do { sleep 0.5; [_veh, "Missile_AA_04_Plane_CAS_01_F"] call BIS_fnc_fire; }; };sleep 15;waitUntil { _veh ammo "Missile_AA_04_Plane_CAS_01_F" == 0; };if ((weapons _veh) find "CMFlareLauncher" >= 0) then { for "_i" from 0 to 20 do { sleep 0.5; [_veh, "CMFlareLauncher"] call BIS_fnc_fire; }; };sleep 15;waitUntil { _veh ammo "CMFlareLauncher" == 0; };if ((weapons _veh) find "Gatling_30mm_Plane_CAS_01_F" > 1) then { for "_i" from 1 to 2000 do { sleep 0.5; [_veh, "Gatling_30mm_Plane_CAS_01_F"] call BIS_fnc_fire; }; };//[_veh, "cket_04_HE_Plane_CAS_01_F"] call BIS_fnc_fire; // fires HE muzzle of the main cannon//[_veh, "Rocket_04_AP_Plane_CAS_01_F"] call BIS_fnc_fire;
sleep 7;t="CBA_O_InvisibleTarget" createVehicle [0,0,0];addMissionEventHandler ["MapSingleClick", { params ["_units", "_pos", "_alt", "_shift"]; hint str _pos;t setpos _pos; {_x doWatch t;_x doTarget t;_x doSuppressiveFire t;}forEach allunits;}];
sleep 10;_veh setVehicleAmmo 1;};/*waitUntil { _BomberHeight = (getPosATL _veh) select 2; _DropVector = sqrt((2*_BomberHeight)/9.8); _BomberWithTargetDistance = _veh distance _dropPosition; _Speed = ((speed _veh) * 1000) / (60 * 60);
// 可以手动调整_BombFactor 以用于控制投弹的精度 _BombFactor = _BomberHeight; _dropBombDistance = (_DropVector * _Speed) + _BombFactor; // hint format ["目标距离:%1 \n 投弹距离:%2 \n 速度(m/s):%3 \n 高度:%4", _BomberWithTargetDistance, _dropBombDistance, _Speed, _BomberHeight]; _BomberWithTargetDistance <= (_dropBombDistance);};
_veh selectWeapon _Weapon;while {_veh ammo _Weapon > 0;} do { [_veh, _Weapon] call BIS_fnc_fire; // sleep 0.1;};*/
//[_grp,_veh] domove getpos player;/*sleep 7;while {true} do { if (player isIRLaserOn currentWeapon player) then { t="CBA_O_InvisibleTarget" createVehicle [0,0,0];addMissionEventHandler ["MapSingleClick", { params ["_units", "_pos", "_alt", "_shift"]; hint str _pos;t setpos _pos; {_x doWatch t;_x doTarget t;_x doSuppressiveFire t;}forEach allunits;}]; sleep 4; }; };*/
2021年05月22日 07点05分 15
level 12
反正我不会,Arma的编辑器太复杂了。。。
2021年05月22日 14点05分 16
[吐舌][呵呵]贵在坚持嘛
2021年05月22日 16点05分
@不离不弃这闪点 我也懒得学,我还是喜欢战役和服务器
2021年05月22日 18点05分
1