Artes-s

Santa_hat_by_Artes

Dec 30th, 2015
784
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. @name Santa_hat_by_Artes
  2. @persist [O E]:entity Just N Table:table
  3. interval(100)
  4. if(first()){
  5. noDuplications()
  6. setName("Новогодняя шапка от Artes'a")
  7. E=entity()
  8. O=owner()
  9. Just = 1
  10. Base = holoCreate(0,E:toWorld(vec(0,0,0)),vec(0.001),E:toWorld(ang(0,0,0)),vec(255),"cube") holoParent(0,E)
  11. Table:pushArray(array(Base:toWorld(vec(0,0,2)),vec(0.7,0.52,0.52),Base:toWorld(ang(0,0,0)),vec(255),"hq_torus_oldsize"))
  12. Table:pushArray(array(Base:toWorld(vec(0,0,2)),vec(0.8,0.6,0.1),Base:toWorld(ang(0,0,0)),vec(255),"hq_tube"))
  13. Table:pushArray(array(Base:toWorld(vec(0,0,6)),vec(0.8,0.6,0.6),Base:toWorld(ang(0,0,0)),vec(255,0,0),"hq_cone"))
  14. Table:pushArray(array(Base:toWorld(vec(0,0,9)),vec(0.2),Base:toWorld(ang(0,0,0)),vec(255),"hq_icosphere"))
  15. }
  16. if(Table:count() > N) {
  17. while(holoCanCreate() & perf()) {
  18. N++
  19. local Holo = Table[N, array]
  20. holoCreate(N, Holo:vector(1), Holo:vector(2), Holo:angle(3), Holo:vector(4), Holo:string(5)):setModel(Holo:string(5))
  21. holoMaterial(N, Holo:string(6))
  22. holoAlpha(N,255)
  23. holoParent(N, Base)
  24. holoMaterial(N,"debug/debugdrawflat")
  25. }
  26. } else {
  27. if(changed(Just)&Just) { setName("Новогодняя шапка от Artes'a") }
  28. if(Just) {
  29. holoPos(0,O:attachmentPos("eyes"))
  30. holoAng(0,O:attachmentAng("eyes"))
  31. holoPos(0,holoEntity(0):toWorld(vec(-3,0,0)))
  32. holoParentAttachment(0,O,"eyes")
  33. } elseif(changed(!Just)&!Just) {
  34. if(!first()){
  35. holoUnparent(0)
  36. holoPos(0,E:pos())
  37. holoAng(0,E:angles())
  38. holoParent(0,E)
  39. }
  40. }
  41. }
Add Comment
Please, Sign In to add comment