|
楼主 |
发表于 2010-11-26 12:14:46
|
显示全部楼层
本帖最后由 FFUR2007SLX2_5 于 2010-12-1 23:18 编辑
使用方法:
把WCRffsx_S8TCoverage.sqs放置在你所保存过的任务中,在我的文档ARMA2 OA/user/mission中可以找到。
脚本下载: V1.3
1、随后进入编辑器加载脚本所在的任务。
2、放置一个逻辑,或随便什么东西,给它随便命名,比如Area。这就是要被轰炸的地区。
3、放置一架在空中飞的Su25,任意地点,任意取名,例如Su25.
4、在A10的init中输入[Su25,Area,0.2] exec "WCRffsx_S8Tcoverage.sqs" 解释下:【飞机名,轰炸地点,火箭弹发射间隔(数字)】 exec "WCRffsx_S8Tcoverage.sqs"
源码- ;////Let a fixed wing aircraft use S8T FFAR cover an area \\\\
- ;////Author: WCR_ffsx \\\\
- ;////Usage [aircraft,BombingArea,frequency between each Rockets] exec "WCRffsx_70mmCoverage.sqs" \\\\
- ;////Example: Create a fixed wing aircraft like Su25, init is flying. Then use logic to locate \\\\
- ;////your bombing area. Finally, use number to fill in the third position in the arrary as launching frequency. \\\\
- ;////My mailbox:ffur2007slx2_5@126.com \\\\
- ;////======================================================================================================================\\\\
- private ["_AmmoNum"]
- WCR_Su25=_this select 0
- WCR_BombArea=_this select 1
- WCR_frequency=_this select 2
- _AmmoNum=40
- if (local player && alive player && player distance WCR_BombArea <=2500 && (damage WCR_Su25<0.1) && (WCR_Su25 Ammo "S8Launcher">=40)) then {goto "Start"} else {hintSilent "Rockets coverage support is not available at present";goto "exit"}
- #start
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {goto "start0"} else {goto "exit"}
- #start0
- WCR_Su25Init=[] spawn {WCR_Su25 disableAI "AutoTarget";WCR_Su25 disableAI "Target";WCR_Su25 flyInHeight 500;WCR_Su25 setpos [getpos WCR_BombArea select 0,(getpos WCR_BombArea select 1)-3000,getpos WCR_Su25 select 2];removeAllWeapons WCR_Su25;"US_Soldier_EP1" createUnit [[getpos WCR_BombArea select 0,(getpos WCR_BombArea select 1)-500,0],WCR_BombArea,"WCR_observer=this;removeallweapons this;dostop this;this setcaptive true;this disableai 'autotarget';this disableai 'target';hideObject this",0]}
- ~0.1
- #start1
- if (alive WCR_Su25 &&(damage WCR_Su25<0.1)) then {WCR_Su25 move getpos WCR_observer} else {goto "exit"}
- if ((WCR_Su25 distance WCR_BombArea <=2500) && (alive WCR_Su25) && (damage WCR_Su25<0.1)) then {goto "AngleAdjust"} else {goto "Start1"}
- #AngleAdjust
- WCR_Su25 flyInHeight 550
- ~15
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {WCR_Su25 setVectorDirAndUp [[0,10,-17],[0,10,0]]} else {goto "exit"}
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {WCR_Su25 move getpos WCR_BombArea} else {goto "exit"}
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {WCR_Su25 flyinheight 100} else {goto "exit"}
- ~0.25
- #Fire
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {Launcher="R_S8T_AT" createVehicle [(getpos WCR_Su25 select 0)-7,(getpos WCR_Su25 select 1),(getpos WCR_Su25 select 2)-7]} else {goto "exit"}
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {Launcher setDir getDir WCR_Su25} else {goto "exit"}
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {Launcher setVectorDirAndUp [[0,10,-11],[0,10,0]]} else {goto "exit"}
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {Launcher0="R_S8T_AT" createVehicle [(getpos WCR_Su25 select 0)+7,(getpos WCR_Su25 select 1),(getpos WCR_Su25 select 2)-7]} else {goto "exit"}
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {Launcher0 setDir getDir WCR_Su25} else {goto "exit"}
- if (alive WCR_Su25 && (damage WCR_Su25<0.1)) then {Launcher0 setVectorDirAndUp [[0,10,-11],[0,10,0]]} else {goto "exit"}
- ~WCR_frequency
- _AmmoNum=_AmmoNum-2
- if (_AmmoNum>0 && alive WCR_Su25) then {goto "Fire"} else {goto "exit"}
- if (_AmmoNum==0 && alive WCR_Su25) then {WCR_Su25 flyinheight 500; deleteVehicle WCR_observer; WCR_Su25 setCaptive false; WCR_Su25 enableAI "AUTOTARGET"; WCR_Su25 enableAI "TARGET"; WCR_Su25 setVehicleAmmo 0.5} else {goto "exit"}
- #exit
- exit
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入VME
x
|