Gmodism

Garry's Mod Prop Spawner Rockets

Sep 18th, 2016
986
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. @name Prop Spawner Rockets
  2. @inputs PropSpawner:wirelink
  3.  
  4. runOnTick(1)
  5.  
  6. Force = 5000 #Sets the speed of the rockets
  7. Weight = 15
  8. #Sets the weight of the rockets
  9.  
  10. ##################CODE##################
  11.  
  12. Props = PropSpawner["Props",array]
  13. Last = PropSpawner["LastSpawned",entity]
  14.  
  15. for(I=1,Props:count())
  16. {
  17. Rocket = Props[I,entity]
  18. Rocket:setMass(Weight)
  19. Rocket:applyForce(Rocket:eye()*Weight*Force)
  20. }
  21. if(changed(Last)&Last)
  22. {
  23. Last:soundPlay(0,0,"weapons/rpg/rocket1.wav")
  24. Last:setTrails(20,0,1,"trails/smoke",vec(255,255,255),255)
  25. }
  26.  
  27. #Made by stefan750
Add Comment
Please, Sign In to add comment