Advertisement
KrazziPro

KrazziPro's SpaceHeli NoHolo

Jul 10th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.84 KB | None | 0 0
  1. @name KrazziPro's SpaceHeli NoHolo
  2. @inputs Pod:wirelink Active_p [Cam Pod MainRotor TailRotor]:wirelink
  3. @outputs Light:vector W A S D PilotLink:array Hurt Mass Constraints:array
  4. @persist E:entity R1_dist W_i START Active Active_i E_speed H_i R_E:array Warning_bip W_active M1 P1 P2 Mod Yaw MRB TRB Mass Hurt EyeX1 EyeY1 Speed Timer Hover Invert Damage Toggle NewYaw AimingM TRLinked MRLinked Injured InTimer Throttle Interval StrafeAlter LiftAlter AimingMethod HoloStartUp StartUpSpeed YawPlus Health RotorDeath RotorProblem AirFriction SoundPitchMult CollisionSpeed TrueSensitivity CameraRotation Manuevarebility HoloRotorEnabled WaterLevel EngineDeath MainRotorBlades TailRotorBlades [RotorSound RotorSound2 RotorMaterial]:string [Array HintDriver AimingModes EyeSensitivity]:array AimingData:table [EyePod MainRotorAng TailRotorAng TargetAngles DeathAng]:angle [E Prop Model]:entity [Place Clamp RotorColor MainRotorPos TailRotorPos CameraPosition MainRotorSize TailRotorSize]:vector
  5. @trigger
  6. @model models/props_phx/construct/metal_plate1x2.mdl
  7.  
  8. interval(20)
  9.  
  10. if(first()| dupefinished())
  11. {
  12. timer("bip",500)
  13. soundPlay(0,0,"ambient/tones/garage.wav")
  14. soundPlay(1,0,"ambient/machines/big_truck.wav")
  15. soundPlay(2,0,"weapons/airboat/airboat_gun_loop2.wav")
  16.  
  17. E=entity()
  18. E:setMass(300)
  19. #E:setAlpha(0)
  20. R_E=E:getConstraints()
  21. rangerPersist(1)
  22. rangerHitWater(1)
  23.  
  24. rangerPersist(1)
  25. rangerHitWater(1)
  26. }
  27.  
  28. W=Pod["W",number]
  29. A=Pod["A",number]
  30. S=Pod["S",number]
  31. D=Pod["D",number]
  32. BEA=Pod["Bearing",number]
  33. ELE=Pod["Elevation",number]
  34. M1=Pod["Mouse1",number]
  35. START=Pod["R",number]
  36. DRIVER=Pod["Entity",entity]
  37. if(START & $START)
  38. {
  39. Active=Active==0
  40. if(Active)
  41. {
  42. soundPlay(6,0,"ambient/machines/thumper_startup1.wav")
  43. soundStop(5)
  44. soundPlay(7,2,"hl1/fvox/activated.wav")
  45. }
  46. else
  47. {
  48. soundPlay(5,0,"ambient/machines/thumper_shutdown1.wav")
  49. soundStop(6)
  50. soundPlay(8,2,"hl1/fvox/deactivated.wav")
  51. }
  52. }
  53. Active_i+=-0.012+(Active>Active_i)*0.02
  54. W_i=W
  55. if($W)
  56. {
  57. if(W)
  58. {
  59. holoAlpha(9,255)
  60. holoSkin(8,0)
  61. soundPlay(4,0,"ambient/machines/diesel_engine_idle1.wav")
  62. }
  63. else
  64. {
  65. holoAlpha(9,0)
  66. holoSkin(8,1)
  67. soundStop(4)
  68. }
  69. }
  70.  
  71. SHIFT=Pod["Shift",number]
  72. Light=vec(100,100,255)*Active
  73. E_vel=E:vel()
  74. E_speed=E_vel:length()
  75. R1_dist_set=30-min(E_vel:z()/2,0)
  76. if($E_speed<-(50+Active*250) )
  77. {
  78. if(Active)
  79. {
  80. #fx("explosion",E:pos(),1)
  81. soundPlay(9,0,"vehicles/v8/vehicle_impact_heavy.wav")
  82. }
  83. #Active=0
  84. #Active_i=0
  85. #Pod["Damage Health",number]=E_speed/20
  86. #soundPlay(6,0.8,"vehicles/v8/vehicle_impact_heavy"+randint(1,4):toString()+".wav")
  87.  
  88.  
  89. }
  90. rangerFilter(R_E)
  91. R1=rangerOffset(R1_dist_set,E:toWorld(vec(0,35,-10)),-vec(0,0,1))
  92. rangerFilter(R_E)
  93. R1_2=rangerOffset(R1_dist_set,E:toWorld(vec(0,-35,-10)),-vec(0,0,1))
  94. rangerFilter(R_E)
  95. R2=rangerOffset(E:pos(),E:pos()+E:vel()*3)
  96. R1_dist=R1:distance()
  97. R2_dist=R1_2:distance()
  98. E_velL=E:velL()
  99. Force=(8+(R1_dist_set-(R1_dist+R2_dist)/2)/3-$R1_dist*3*R1:hit()-E_velL:z()/300 +E_velL:y()/1200)
  100.  
  101. #Force=(10+SHIFT*6+(80-R1_dist)/3-$R1_dist*3*R1:hit())
  102. S_i=abs(E_velL:y())/5
  103. H_i+=(S_i/10+6)*Active_i
  104. holoAng(0,E:toWorld(ang(H_i,0,90)))
  105. holoAng(1,E:toWorld(ang(-H_i,0,90)))
  106.  
  107. soundPitch(0,(Force*3 +S_i/2)*Active_i)
  108. soundPitch(1,(40+S_i/2)*Active_i)
  109. soundPitch(2,Active*10+(20+S_i/4)*Active_i)
  110. soundPitch(4,(200+S_i/10)*Active_i)
  111. E:applyForce((-E:forward()*E_velL:x()*vec(1,1,-0.7)*10+E:up()*Force*400 -E:right()*(W-S)*10000 +E_vel)*Active_i)
  112. #E:applyAngForce((-ang(E_velL:x()*2 -(D-A)*100,(-A+D)*500,+min(max(-E_velL:y()+(W-S)*100000,-400),400+E_velL:y()/2))/20-E:angles()*ang(1,0,1)-E:angVel()/2)*500)
  113. E:applyAngForce(((-ang(+min(max(E_velL:x()*2 -(D-A)*100,-70000000000000),70000000),(-A+D)*900,(R1_dist-R2_dist)*120+(W-S)*500 +0- E_velL:y()*((Active_p==0)*10-0.5+SHIFT*1.6) )/20-E:angles()*ang(1,0,1)-E:angVel()*ang(0.5,0.5,1))*500)*Active_i)
  114.  
  115. holoAng(2,ang(-ELE,BEA,0)+ang(180,0,0))
  116. if(M1 & $M1)
  117. {
  118. #Missile=spawnEntity("rpg_missile",E:pos()-E:up()*35,ang(-ELE,BEA,0),0)
  119.  
  120. }
  121. if(clk("bip"))
  122. {
  123. timer("bip",500)
  124. if(R2:hit() & Active)
  125. {
  126. Dist_i=(E:pos()-R2:position()):length()
  127. if(((E_vel:length()*3)/Dist_i)>3)
  128. {
  129. #soundPlay(8,0,"hl1/fvox/warning.wav")
  130. soundPitch(8,100)
  131. timer("bip",1000)
  132. }
  133. else
  134. {
  135. #soundPlay(8,0,"buttons/button17.wav")
  136. soundPitch(8,50+8000/Dist_i)
  137. timer("bip",300)
  138. }
  139. }
  140.  
  141. }
  142. if(abs(E:angles():pitch())>70 & E_speed<3)
  143. {
  144. E:applyAngForce(-E:angles()*ang(1,0,1)*8000)
  145. E:soundPlay(12,0,"ambient/machines/diesel_engine_idle1.wav")
  146. }
  147.  
  148. #holoAlpha(5,(0.4+random(1))*Active_i)
  149. #holoAlpha(6,(0.4+random(1))*Active_i)
  150. #holoAlpha(7,(0.4+random(1))*Active_i)
  151. #holoAlpha(4,(0.4+random(1))*Active_i)
  152. ———————————————
  153. ———————————————
  154. ———————————————
  155. #@name Badger's helicopter chip
  156. #@inputs [Cam Pod MainRotor TailRotor]:wirelink
  157. #@outputs PilotLink:array Hurt Mass Constraints:array
  158. #@persist P1 P2 Mod Yaw MRB TRB Mass Hurt EyeX1 EyeY1 Speed Timer Hover Invert Damage Toggle NewYaw AimingM TRLinked MRLinked
  159. #@persist Injured InTimer Throttle Interval StrafeAlter LiftAlter AimingMethod HoloStartUp StartUpSpeed YawPlus Health RotorDeath RotorProblem
  160. #@persist AirFriction SoundPitchMult CollisionSpeed TrueSensitivity CameraRotation Manuevarebility HoloRotorEnabled WaterLevel EngineDeath
  161. #@persist MainRotorBlades TailRotorBlades [RotorSound RotorSound2 RotorMaterial]:string
  162. #@persist [Array HintDriver AimingModes EyeSensitivity]:array AimingData:table [EyePod MainRotorAng TailRotorAng TargetAngles DeathAng]:angle [E Prop Model]:entity
  163. #@persist [Place Clamp RotorColor MainRotorPos TailRotorPos CameraPosition MainRotorSize TailRotorSize]:vector
  164. #@model models/hunter/blocks/cube1x2x025.mdl
  165.  
  166.  
  167. # Badger130 made this
  168. # Please do not claim as your own
  169. # distribute freely
  170. # version - V1.2.4
  171. #Digit 1 Represents a major functionality change
  172. #Digit 2 Represents a new feature
  173. #Digit 3 Represents a bug fix
  174.  
  175.  
  176.  
  177.  
  178. ###### this is Badger130's Helicopter Chip ######
  179. if(first()){
  180. ###### setup #######
  181. #New Info to read on V1.2.2
  182. #The wirelinks MainRotor and TailRotor are for rotor survivability
  183. #This is for more realistic heli battles in acf or gdc
  184. #If you dont want that, just leave those 2 variables alone and DONT link them
  185. #They way they work if you do want them, is you link them to a prop,
  186. #and it will destroy the rotor If that prop is killed
  187.  
  188. #@model changes the model of the base prop
  189.  
  190. Interval = 20 #Increasing this will decrease ops, but you will need to increase the lift and other options
  191. #Performance may also drop if it is too high
  192. #Flight Settings
  193. Manuevarebility = 10 #this is how agile the helicopter is
  194. LiftAlter = 20 #This is how much pressing W or S affects the heli
  195. StrafeAlter = 1.4 #This is how much the helicopter will strafe
  196. AirFriction = 100 #This is how much friction there is for the heli
  197. StartUpSpeed = 0.15 #This is how fast it takes the heli to reach full throttle
  198.  
  199. #Phyiscal damage settings
  200. Damage = 1 #Determines weather the heli will acount for physical damage or not
  201. CollisionSpeed = 250 #This is how fast the heli has to be flying prior to a collision to hurt the motor
  202.  
  203. #Camera settings
  204. CameraPosition = vec(0,0,160) #This is the position of the camera relative to the helicopter
  205. CameraRotation = 270 #This is the position of the camera relative to the player's eye
  206. AimingModes = array(1,2,3,4) #This controls the order of the aiming modes by the alt button
  207. #Simply remove a number if you dont want that aiming mode
  208. #1 is 3rd person look-around, 2 is 1st person look-around
  209. #3 is bf3 1st person, 4 is bf3 3rd person
  210.  
  211.  
  212. MainRotorBlades = 5 #This is the number of blades on the main rotor
  213. MainRotorSize = vec(26,1,0.2) #This is the scale of the main rotor being length,width,height repsectively
  214. MainRotorPos = vec(0,0,80) #This is the position of the main rotor reliative to the e2
  215. MainRotorAng = ang(0,0,0) #This is the angle the main rotor will rotate on
  216.  
  217. TailRotorBlades = 3 #This is the number of blades on the tail rotor
  218. TailRotorSize = vec(8,0.5,0.2) #This is the scale of the tail rotor being length,width,height repsectively
  219. TailRotorPos = vec(0,-170,60) #This is the position of the tail rotor reliative to the e2
  220. TailRotorAng = ang(-90,0,0) #This is the angle the tail rotor will rotate on
  221.  
  222. RotorColor = vec(140,140,140) #This is the color of the rotors in Red,Green,Blue format
  223. RotorMaterial = "phoenix_storms/concrete1" #This is the material of the rotors
  224.  
  225. RotorSound = "NPC_AttackHelicopter.Rotors" #This is the Sound of the rotors
  226. SoundPitchMult = 2.9 #This is how much the soundpitch is multiplied
  227. ###### setup #######
  228.  
  229.  
  230.  
  231.  
  232.  
  233. #####Update Info#####
  234. #[
  235. ---
  236. Version Update V1.2.4
  237. Optimized lift calculation so that heli can now perform heavy lifting-
  238. -and you will no longer need to manual calculate lift
  239. ---
  240. Version Update V1.2.3
  241. Fixed no warning sounds being played when your heli is damaged
  242. ---
  243. Version Update V1.2.2
  244. Added Rotor survivability to improve accuracy to real life helis
  245. Fixed Death animations to be properly implented
  246. ---
  247. Version update V1.1.2
  248. Optimized and cleaned coding
  249. Transfered the aiming system from a large conditional to split dual-conditionals and an array
  250. Fixed the rotor blur clipping and looking lopsided
  251. Modifed the hover mode slightly
  252. ---
  253. Version update V1.1.1
  254. Added Support for the holoPilot via array "PilotLink"
  255. Added a feature called "AimingModes" to control the order and content of the 4 aiming modes
  256. Added Version update details to keep track of progress and inform users of new content
  257. Fixed Transitioning between look-around and bf3 aiming methods
  258. Fixed Startup on bf3 mode, so the heli doesnt flip around
  259. Fixed Yaw on bf3 mode, so the heli wont default to 0 yaw
  260. Fixed AutoHover on bf3 mode
  261. ---
  262. ]#
  263.  
  264.  
  265. # Codeing below
  266. # Do not alter unless you know what you are doing
  267.  
  268.  
  269. interval(20)
  270. E = entity()
  271. Array = array()
  272. EyeSensitivity = array()
  273. WaterLevel = -70000
  274. AimingM = 0
  275. MainRotorDeath = 0
  276. TailRotorDeath = 0
  277. TRLinked = ->TailRotor
  278. MRLinked = ->MainRotor
  279.  
  280. Clamp = vec(Manuevarebility,Manuevarebility,Manuevarebility)
  281.  
  282.  
  283. Constraints = E:getConstraints()
  284. for(A = 1,E:hasConstraints())
  285. {
  286. if(Constraints[A,entity]:parent():isValid())
  287. {
  288. Mass += 0
  289. }
  290. else
  291. {
  292. Mass += Constraints[A,entity]:mass()
  293. }
  294. }
  295. #Data goes in order as follows - array(AimingMode,HoloPos during parenting,CamPos during parenting,AimingModeHint
  296. AimingData = table(
  297. array(1,vec(-CameraRotation,0,0),vec(),"Third person 'point-style' aiming engaged")
  298. ,array(2,vec(),vec(),"First person 'Look-Around' aiming engaged")
  299. ,array(3,vec(),vec(),"First person 'BF3' aiming engaged")
  300. ,array(4,vec(),vec(),"Third person 'BF3' aiming engaged")
  301. )
  302.  
  303. HintDriver = array(
  304. "This is Badger130's Helicopter Chip",3
  305. ,"Turn on your light to Start the engine",4
  306. ,"Press W to go up, and S to go down",4.7
  307. ,"Hold ALT to switch aiming methods",5.4
  308. ,"Use the mouse to aim the helicopter",6.1
  309. ,"Speed is dependent on your pitch and roll",7
  310. )
  311.  
  312.  
  313. W = Pod["W",number]
  314. A = Pod["A",number]
  315. S = Pod["S",number]
  316. D = Pod["D",number]
  317. Alt = Pod["Alt",number]
  318. Light = Pod["Light",number]
  319. Space = Pod["Space",number]
  320. Active = Pod["Active",number]
  321. Seat = Pod["Entity",entity]
  322. EAng = E:angles()
  323. EPos = E:pos()
  324. EVel = E:vel()
  325. MR = MainRotor:entity()
  326. TR = TailRotor:entity()
  327.  
  328.  
  329. Cam["Activated",number] = Active
  330.  
  331.  
  332.  
  333. if(changed(Active) & Active)
  334. {
  335. for(H = 1,HintDriver:count()/2)
  336. {
  337. Seat:hintDriver(HintDriver[H * 2 - 1,string]
  338. ,HintDriver[H * 2,number])
  339.  
  340. timer("Purge",250)
  341. }
  342.  
  343. Pod["Hide Player",number] = ->PilotLink
  344. }
  345.  
  346.  
  347. if(changed(AimingMethod) | changed(Active) | clk("Purge"))
  348. {
  349. CurData = AimingData[AimingMethod,array]
  350.  
  351.  
  352. Cam["Position",vector] = CurData[2,vector]
  353. Cam["Angle",angle] = ang()
  354. Cam["Parent",entity] = holoEntity(2)
  355.  
  356.  
  357. Seat:hintDriver(CurData[4,string],5)
  358.  
  359. Yaw = EAng:yaw() + 90
  360. EyeY1 = AimingMethod <= 2 ? E:angles():yaw() + 90 : -EAng:pitch()
  361.  
  362. }
  363. elseif(!changed(Active))
  364. {
  365.  
  366. if(Alt)
  367. {InTimer = clamp(InTimer + 1,0,18)}
  368. elseif(!Alt)
  369. {InTimer = 0}
  370.  
  371.  
  372. AimingM = mod(AimingM + (changed(InTimer)
  373. & (InTimer == 18)),AimingModes:count())
  374. AimingMethod = AimingModes[AimingM + 1,number]
  375.  
  376. if(changed(Space) & Space)
  377. {Hover = !Hover
  378. HoverHeight = EPos:z()}
  379.  
  380. CamPos = E:toWorld(CameraPosition:setZ(0))
  381. + vec(0,0,CameraPosition:z())
  382.  
  383.  
  384.  
  385.  
  386.  
  387. EyeAngles = Seat:toLocal(Seat:driver():eyeAngles())
  388.  
  389. EyeSensitivity:insertAngle(1,EyeAngles)
  390. if(EyeSensitivity:count() > 2)
  391. {EyeSensitivity:pop()}
  392. EyePod1 = EyeAngles - EyeSensitivity[2,angle]
  393. EyePodYaw = EyePod1:yaw()
  394.  
  395.  
  396. YawPlus = (EyePodYaw > 180) ? -360 * (EyePodYaw > 180) : 360 * (EyePodYaw < -180)
  397. EyePod = EyePod1 + ang(0,YawPlus,0)
  398.  
  399. EyeX1 = mod(EyeX1 + EyePod:pitch(),360)
  400. EyeY1 = mod(EyeY1 + EyePod:yaw(),360)
  401. Eye = ang(EyeX1,EyeY1,EyeAngles:roll())
  402.  
  403.  
  404. if(changed(Alt) & !Alt & (InTimer < 18))
  405. {Invert = !Invert
  406. Seat:hintDriver("Pitch Inverted",5)}
  407.  
  408. if(!Hover & !RotorDeath)
  409. {#Condition 3.2.2.1 Start
  410. NewYaw = EAng:yaw()
  411. if(!changed(AimingMethod) & AimingMethod <= 2)
  412. {
  413. Strafe = (D - A) * StrafeAlter
  414. TargetAngles = Eye:setRoll( -E:angVel():yaw() / 2 + Strafe * 15)
  415. }
  416. elseif(!changed(AimingMethod) & (AimingMethod >= 3))
  417. {
  418. Yaw = mod(Yaw + (A - D)*StrafeAlter - E:velL():x()*0.0016,360)
  419. TargetAngles = ang(Eye:pitch() * (Invert - !Invert),Yaw,-Eye:yaw())
  420. }
  421.  
  422. }#Condition 3.2.2.1 End
  423. elseif(Hover & !RotorDeath)
  424. {#Condition 3.2.2.2 Start
  425. VelL = E:velL()
  426. TargetAngles = ang(
  427. clamp(-(VelL:y() * abs(VelL:y())) / 2000, -75, 75),
  428. NewYaw + 90,
  429. clamp(-(VelL:x() * abs(VelL:x())) / 2000, -75, 75))
  430. }#Condition 3.2.2.2 End
  431. elseif(RotorDeath)
  432. {
  433.  
  434. TargetAngles = EAng - ang(0,20,0)
  435.  
  436. Clamp = vec(Manuevarebility,Manuevarebility,50)
  437. }
  438.  
  439. (AimingMethod == 1 ? CamPos : (->PilotLink ? Seat:toWorld(vec(0,7,39)) + vec(4,0,0):rotate(Eye) : Seat:toWorld(vec(0,1,35)))) :
  440. (AimingMethod == 3 ? Seat:toWorld(vec(0,6,45)) : CamPos + vec(0,-CameraRotation,0):rotate(E:angles()))
  441.  
  442.  
  443.  
  444. }#Condition 3.2.2 End
  445.  
  446. #ApplyForce Code#
  447. Constraints = E:getConstraints()
  448. if(changed(Constraints:count()))
  449. {
  450. Mass = 0
  451. for(G = 1,Constraints:count())
  452. {
  453. if(Constraints[G,entity]:parent():isValid())
  454. {
  455. Mass += 0
  456. }
  457. else
  458. {
  459. Mass += Constraints[G,entity]:mass()
  460. }
  461. }
  462. }
  463.  
  464. if(!MainRotorDeath)
  465. {
  466. Affect = Throttle*(Mass / E:mass() / 2 + 0.57) +
  467. (clamp((-EVel:z())*Hover / 10 + W - S - RotorDeath,-1,1))*LiftAlter
  468.  
  469. Alter = (vec(0,0,1):rotate(E:toWorld(ang())*ang(1.7,1,1.5))
  470. - EVel*AirFriction*0.000002)
  471.  
  472. E:applyForce(Alter * Affect * E:mass())
  473. }
  474.  
  475. #ApplyForce Code#
  476.  
  477. #Quaternion Aiming code#
  478.  
  479. TarQ2 = quat(TargetAngles)
  480. CurQ2 = quat(E:toWorld(ang(0,90,0)))
  481.  
  482. Q2 = TarQ2/CurQ2
  483.  
  484. V2 = clamp(E:toLocal(rotationVector(Q2) + EPos)*Active,-Clamp,Clamp)
  485. E:applyTorque((200*V2 - 40*E:angVelVector())
  486. *E:inertia()*(Throttle/33))
  487.  
  488. #Quaternion Aiming Code#
  489.  
  490. #Engine Control#
  491. Water = E:isUnderWater()
  492. if(changed(Water) & Water)
  493. {WaterLevel = EPos:z()}
  494.  
  495. UnderWater = (E:toWorld(MainRotorPos - vec(0,0,50)):z() < WaterLevel)
  496. if(changed(Light) & Light)
  497. {
  498. Toggle = !Toggle
  499. Speed = StartUpSpeed
  500. }
  501. elseif(changed(UnderWater) & UnderWater & Water)
  502. {
  503. Toggle = 0
  504. Speed = 0.6
  505. }
  506. elseif(changed(Active) & !Active)
  507. {Toggle = 0}
  508.  
  509.  
  510. Timer = clamp(Timer + (Toggle-!Toggle - RotorProblem) * Speed,0,33)
  511. Throttle = (Timer ^ 2) / 33
  512. P1 = clamp(P1+(W-!W)*(Throttle>=30)/4,0,4)
  513. P2 = clamp(P2+(S-!S)*(Throttle>=30)/4,0,2)
  514. Go = (Timer+P1-P2)
  515. Mod = mod(Mod+Timer,360)
  516.  
  517. #Engine Control#
  518.  
  519. #Rotor Survivability#
  520. if(Damage > 0)
  521. {
  522. Array:insertNumber(1,EVel:length())
  523. if(Array:count()>7)
  524. {Array:pop()}
  525.  
  526. ChangedSpeed = EVel:length() - Array[7,number]
  527. Physgun = owner():weapon():type()
  528. == "weapon_physgun" & owner():keyAttack1()
  529. LPrev = (ChangedSpeed< -(CollisionSpeed)) & !Physgun
  530. HPrev = (ChangedSpeed< -(CollisionSpeed*2)) & !Physgun
  531.  
  532. if(changed(LPrev) & LPrev)
  533. {E:soundPlay(2,1,"ATV_impact_medium")}
  534.  
  535. if(changed(HPrev) & HPrev)
  536. {
  537. E:soundPlay(5,0,"/vehicles/digger_stopengine1.wav")
  538. E:soundPlay(6,0,"ATV_impact_heavy")
  539. RotorProblem = 3
  540. Seat:soundPlay(8,0,"/npc/attack_helicopter/aheli_crash_alert2.wav")
  541.  
  542. }
  543.  
  544. if(MRLinked & changed(->MainRotor) & !->MainRotor)
  545. {
  546. Seat:soundPlay(8,0,"/npc/attack_helicopter/aheli_crash_alert2.wav")
  547. RotorDeath = 1
  548. RotorProblem = 6
  549. }
  550. }
  551. if(TRLinked & changed(->TailRotor) & !->TailRotor)
  552. {
  553. RotorDeath = 1
  554. Seat:soundPlay(8,0,"/npc/attack_helicopter/aheli_crash_alert2.wav")
  555.  
  556. for(G = 1,TailRotorBlades)
  557. {
  558. holoVisible(4,players(),0)
  559. holoVisible(5,players(),0)
  560. holoVisible(G + 6 + MainRotorBlades,players(),0)
  561. }
  562. }
  563.  
  564. }
  565.  
  566. #Rotor Survivability#
  567.  
  568. PilotLink = array(Active,Seat,Timer / 1.735 + P1 - P2,Eye,EAng - Eye + ang(0,90,0),AimingMethod)
  569.  
  570.  
  571. soundPitch(1,Go*SoundPitchMult/1)
  572. soundPitch(4,Go*SoundPitchMult/1)
  573.  
  574.  
  575.  
  576. }#Condition 3 End
  577. Valid = ->MainRotor
  578.  
  579. if(dupefinished())
  580. {reset()}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement