SHARE
TWEET

Untitled

a guest Jul 17th, 2017 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @name [Teal'c] Advanced Ship Core Turret
  2. @inputs Pod:entity Fire
  3. @outputs
  4. @persist Ang:angle Aim LS:array Ent:entity
  5. @trigger
  6. @model models/slyfo_2/pss_baseplate.mdl
  7.  
  8. if (first()) {
  9.     runOnTick(1)
  10.     runOnChat(1)
  11.     entity():setMaterial("phoenix_storms/black_chrome")
  12.     Damage = 50
  13.  
  14.     holoCreate(1)
  15.     holoModelAny(1, "models/slyfo_2/mini_turret_swivel.mdl")
  16.     holoMaterial(1, "phoenix_storms/black_chrome")
  17.     holoCreate(2)
  18.     holoModelAny(2, "models/slyfo_2/weap_prover_industrialspiker.mdl")
  19.     holoMaterial(2, "phoenix_storms/black_chrome")
  20.     Aim=1
  21. }
  22.  
  23. if(chatClk(owner())) {
  24.     LS=owner():lastSaid():lower():explode(" ")
  25.     if(LS[1,string]=="#aim") {Aim=1}
  26.     if(LS[1,string]=="#targ") {Aim=0,Ent=findPlayerByName(LS[2,string])
  27.         hideChat(1)
  28.         }
  29.     LS=array()
  30. Ent:pos() == Ent:pos() + randvec(vec(-20,-20,-20),vec(20,20,20))
  31. }
  32.  
  33. if(Aim) {Ang=Pod:driver():eye():toAngle()}
  34. else {Ang=(holoEntity(2):boxCenterW()-Ent:boxCenterW()):toAngle()}
  35.  
  36. # Turret Stand
  37. holoPos(1, entity():pos() + vec(0,0,10))
  38. holoAng(1,ang(0,Ang:yaw(),0))
  39.  
  40. # Main Turret
  41. holoPos(2, entity():pos() + vec(0,0,20))
  42. holoAng(2,ang((Aim ? Ang:pitch() : -Ang:pitch()),Ang:yaw()+180,0))
  43.  
  44.    
  45.     if (Fire) {
  46.         timer("cycle", 100)
  47.     entity():shootBeamTo(Ent:pos(),50,50,50,50)    
  48.      fx("ISSmallPulseBeam",Ent:pos(),1,ang(),holoEntity(2):pos())
  49. if (clk("cycle")) {
  50.    concmd("say @@ Beam Laser Cycling!")
  51. timer("cycle", 100)
  52. }
  53.  
  54. }
RAW Paste Data
Top