Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Spring
- @inputs Screen:wirelink
- @outputs Timer Out Pitch Multi I Holograms
- @persist Ranger:ranger
- @trigger
- runOnTick(1)
- if(first()|duped()){
- Multi=1
- Holograms=30
- Scale=vec(0.5,0.5,0.5)
- Pitch=45
- #If the model is "hq_torus_thick" then the height multiplier is 9
- #If the model is "hq_torus" then the height multiplier is 5.25
- holoCreate(0)
- holoModel(0,"plane")
- holoParent(0,entity())
- for(I=1,Holograms){
- holoCreate(I,entity():toWorld(vec(0,0,I*cos(Pitch)*9)),Scale,entity():toWorld(ang(90+Pitch*(I%2+(I%2-1)),0,0)),vec(1,1,1)*255,"hq_torus")
- holoParent(I,entity())
- holoClipEnabled(I,1)
- holoClip(I,vec(),vec(0,I%2+(I%2-1),0),0)
- }
- }
- #[if(Pitch==80){
- Multi=-1
- }
- if(Pitch==10){
- Multi=1
- }
- Pitch=Pitch+Multi/5]#
- Ranger=rangerOffset(Holograms*cos(75)*5.25,entity():pos(),entity():up())
- holoPos(0,Ranger:position())
- Pitch=acos(Ranger:distance()/5.25/Holograms)
- for(I=1,Holograms){
- holoPos(I,entity():toWorld(vec(0,0,I*cos(Pitch)*5.25)))
- holoAng(I,entity():toWorld(ang(90+Pitch*(I%2+(I%2-1)),0,0)))
- }
- Ranger:entity():applyOffsetForce((entity():up()*Ranger:entity():mass()*((Holograms*cos(75)*5.25)-Ranger:distance())),Ranger:position())
- entity():applyForce(-entity():up()*entity():mass()*((Holograms*cos(75)*5.25)-Ranger:distance()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement