Artes-s

Sosylka_by_Artes

Dec 30th, 2015
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. @name Sosylka_by_Artes
  2. @persist [O E Base]:entity Just N Table:table
  3. interval(100)
  4. if(first()){
  5. noDuplications()
  6. setName("Сосулька от Artes'a")
  7. E=entity()
  8. O=owner()
  9. Base = holoCreate(0,E:toWorld(vec(0,0,0)),vec(0.001),E:toWorld(ang(0,0,0)),vec(255),"cube") holoParent(0,E)
  10. for(I=1,randint(3,7)){
  11. Table:pushArray(array(Base:toWorld(vec(0,0,0+10*I)),vec(0.1+I/5,0.1+I/5,2.1),Base:toWorld(ang(0,0,180)),vec(0,randint(161,200),randint(200,255)),"cone","debug/debugdrawflat"))
  12. }
  13. }
  14. if(Table:count() > N) {
  15. while(holoCanCreate() & perf(1)) {
  16. N++
  17. local Holo = Table[N, array]
  18. holoCreate(N, Holo:vector(1), Holo:vector(2), Holo:angle(3), Holo:vector(4), Holo:string(5))
  19. holoMaterial(N, Holo:string(6))
  20. holoParent(N, Base)
  21. }
  22. } else {
  23. if(O:weapon():type() == "weapon_crowbar") { Just = 1 O:weapon():setAlpha(0) } else { Just = 0 }
  24. if(changed(Just)&Just) {
  25. holoPos(0,O:attachmentPos("anim_attachment_rh"))
  26. holoAng(0,O:attachmentAng("anim_attachment_rh"))
  27. holoPos(0,holoEntity(0):toWorld(vec(0,0,-15)))
  28. holoAng(0,holoEntity(0):toWorld(ang(0,-10,0)))
  29. holoParentAttachment(0,O,"anim_attachment_rh")
  30. }
  31. elseif(!Just) {
  32. if(!first()){
  33. holoUnparent(0)
  34. holoPos(0,E:pos())
  35. holoAng(0,E:angles())
  36. holoParent(0,E)
  37. }
  38. }
  39. }
Add Comment
Please, Sign In to add comment