Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Animation
- @persist [E O Base]:entity Move Speed
- # ЭТО КОД ДЛЯ СОЗДАНИЯ АНИМАЦИИ ОТ ARTES'A
- # ETO KOD DLA SOZDANIYA ANIMATION OT ARTES'A
- interval(100)
- if(first()){
- Speed = 1
- E = entity()
- O = owner()
- Move=1
- Base = holoCreate(0,E:toWorld(vec(0,0,0)),vec(0.6),E:toWorld(ang(0,0,0)),vec(255,0,0),"cube")
- holoCreate(1,E:toWorld(vec(0,0,0)),vec(0.5),E:toWorld(ang(0,0,0)),vec(0,255,255),"cube")
- holoCreate(2,E:toWorld(vec(0,50,0)),vec(0.5),E:toWorld(ang(0,0,0)),vec(255,0,255),"cube")
- holoCreate(3,E:toWorld(vec(50,50,0)),vec(0.5),E:toWorld(ang(0,0,0)),vec(255,255,0),"cube")
- holoCreate(4,E:toWorld(vec(50,0,0)),vec(0.5),E:toWorld(ang(0,0,0)),vec(0,0,255),"cube")
- holoCreate(5,E:toWorld(vec(25,25,25)),vec(0.5),E:toWorld(ang(0,0,0)),vec(255,255,255),"cube")
- for(I=0,10) { holoParent(I,E) }
- } else {
- if(Move==1){
- if(holoEntity(0):pos():distance(holoEntity(2):pos())>5){
- holoPos(0,holoEntity(0):toWorld(vec(0,1*Speed,0)))
- holoAng(5,holoEntity(5):toWorld(ang(1*Speed,0,0)))
- } else { Move = 2}
- }
- elseif(Move==2) {
- if(holoEntity(0):pos():distance(holoEntity(3):pos())>5){
- holoPos(0,holoEntity(0):toWorld(vec(1*Speed,0,0)))
- holoAng(5,holoEntity(5):toWorld(ang(0,-1*Speed,0)))
- } else { Move = 3}
- }
- elseif(Move==3) {
- if(holoEntity(0):pos():distance(holoEntity(4):pos())>5){
- holoPos(0,holoEntity(0):toWorld(vec(0,-1*Speed,0)))
- holoAng(5,holoEntity(5):toWorld(ang(0,1*Speed,0)))
- } else { Move = 4}
- }
- elseif(Move==4) {
- if(holoEntity(0):pos():distance(holoEntity(1):pos())>5){
- holoPos(0,holoEntity(0):toWorld(vec(-1*Speed,0,0)))
- holoAng(5,holoEntity(5):toWorld(ang(-1*Speed,0,0)))
- } else { Move = 1}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement