Advertisement
Artes-s

Untitled

Dec 28th, 2015
605
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. @name Animation
  2. @persist [E O Base]:entity Move Speed
  3.  
  4. # ЭТО КОД ДЛЯ СОЗДАНИЯ АНИМАЦИИ ОТ ARTES'A
  5. # ETO KOD DLA SOZDANIYA ANIMATION OT ARTES'A
  6.  
  7. interval(100)
  8. if(first()){
  9. Speed = 1
  10. E = entity()
  11. O = owner()
  12. Move=1
  13.  
  14. Base = holoCreate(0,E:toWorld(vec(0,0,0)),vec(0.6),E:toWorld(ang(0,0,0)),vec(255,0,0),"cube")
  15.  
  16. holoCreate(1,E:toWorld(vec(0,0,0)),vec(0.5),E:toWorld(ang(0,0,0)),vec(0,255,255),"cube")
  17. holoCreate(2,E:toWorld(vec(0,50,0)),vec(0.5),E:toWorld(ang(0,0,0)),vec(255,0,255),"cube")
  18. holoCreate(3,E:toWorld(vec(50,50,0)),vec(0.5),E:toWorld(ang(0,0,0)),vec(255,255,0),"cube")
  19. holoCreate(4,E:toWorld(vec(50,0,0)),vec(0.5),E:toWorld(ang(0,0,0)),vec(0,0,255),"cube")
  20.  
  21. holoCreate(5,E:toWorld(vec(25,25,25)),vec(0.5),E:toWorld(ang(0,0,0)),vec(255,255,255),"cube")
  22. for(I=0,10) { holoParent(I,E) }
  23.  
  24. } else {
  25.  
  26. if(Move==1){
  27. if(holoEntity(0):pos():distance(holoEntity(2):pos())>5){
  28. holoPos(0,holoEntity(0):toWorld(vec(0,1*Speed,0)))
  29. holoAng(5,holoEntity(5):toWorld(ang(1*Speed,0,0)))
  30. } else { Move = 2}
  31. }
  32.  
  33. elseif(Move==2) {
  34. if(holoEntity(0):pos():distance(holoEntity(3):pos())>5){
  35. holoPos(0,holoEntity(0):toWorld(vec(1*Speed,0,0)))
  36. holoAng(5,holoEntity(5):toWorld(ang(0,-1*Speed,0)))
  37. } else { Move = 3}
  38. }
  39.  
  40. elseif(Move==3) {
  41. if(holoEntity(0):pos():distance(holoEntity(4):pos())>5){
  42. holoPos(0,holoEntity(0):toWorld(vec(0,-1*Speed,0)))
  43. holoAng(5,holoEntity(5):toWorld(ang(0,1*Speed,0)))
  44. } else { Move = 4}
  45. }
  46. elseif(Move==4) {
  47. if(holoEntity(0):pos():distance(holoEntity(1):pos())>5){
  48. holoPos(0,holoEntity(0):toWorld(vec(-1*Speed,0,0)))
  49. holoAng(5,holoEntity(5):toWorld(ang(-1*Speed,0,0)))
  50. } else { Move = 1}
  51. }
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement