|
楼主 |
发表于 2012-8-9 11:13:44
|
显示全部楼层
_FLY = _this select 0; //飞机名
_GH = _this select 1;//物品名
"USMC_Soldier2" createUnit[_fly, group _fly,"GH=this"];
GH disableAI "Anim"
//selectplayer _GH
_GH = GH
_fly enableSimulation false
_GH enableSimulation false
_GH hideObject true;
_GH setpos getpos _fly;_GH setdir getdir _fly
_fly attachTo [_GH,[0,0,1]];//需要根据何种战斗机以定义高度数值~否则会沉入地面
player action ["ENGINEON",_fly];
_GH enableSimulation true
_fly enableSimulation true
~random 5
_eng = 0
#er
_eng = _eng + 1
?(_eng > 80):goto "fly"
_GH setvelocity[0*sin(getdir _GH),0*cos(getdir _GH),0];
~0.01
goto "er"
#fly
_GHin = 0
_GH action ["autoHover", _GH]
#flyss
_GHin = _GHin + 1
_GH flyinheight 200
?(_GHin > 40):goto "off"
_GH setvelocity[0*sin(getdir _GH),0*cos(getdir _GH),+5];
~0.1
goto "flyss"
#off
_ui = 0
#rt
_ui = _ui + 1
?(_ui > 100):goto "end"
_GH setvelocity[10*sin(getdir _GH),10*cos(getdir _GH),+10];
~0.1
goto "rt"
#end
_fly attachTo [_fly,[0,0,0]];
~2
_fly setvelocity[50*sin(getdir _fly),50*cos(getdir _fly),+50];
~100
_GH setdammage 1;
重新更改~基本搞定了~不会歪到一边去了 |
|