Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Toast's Ball Signal
- @inputs Ball1 Ball2
- @outputs
- @persist Ball1Pos Ball2Pos
- @trigger
- if(first() | dupefinished()){
- Color = vec(250,250,250)
- Material = "WTP/wood_1a"
- A = 1
- holoCreate(A, entity():toWorld(vec(0,0,96)), vec(1),
- entity():toWorld(ang(90,0,0)))
- holoColor(A, Color)
- holoModel(A, "models/sprops/cuboids/height12/size_1/cube_12x192x12.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 2
- holoCreate(A, entity():toWorld(vec(0,7.5,185)), vec(1),
- entity():toWorld(ang(0,0,90)))
- holoColor(A, Color)
- holoModel(A, "models/sprops/rectangles/size_1_5/rect_6x78x3.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 3
- holoCreate(A, entity():toWorld(vec(0,-7.5,185)), vec(1),
- entity():toWorld(ang(0,0,90)))
- holoColor(A, Color)
- holoModel(A, "models/sprops/rectangles/size_1_5/rect_6x78x3.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 4
- holoCreate(A, entity():toWorld(vec(0,7.5,36)), vec(1),
- entity():toWorld(ang(0,0,90)))
- holoColor(A, Color)
- holoModel(A, "models/sprops/rectangles/size_1_5/rect_6x78x3.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 5
- holoCreate(A, entity():toWorld(vec(0,-7.5,36)), vec(1),
- entity():toWorld(ang(0,0,90)))
- holoColor(A, Color)
- holoModel(A, "models/sprops/rectangles/size_1_5/rect_6x78x3.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 6
- holoCreate(A, entity():toWorld(vec(-13,6.5,178)), vec(1),
- entity():toWorld(ang(35,0,90)))
- holoColor(A, Color)
- holoModel(A, "models/sprops/rectangles_thin/size_1/rect_3x24x1_5.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 7
- holoCreate(A, entity():toWorld(vec(-13,6.5,178)), vec(1),
- entity():toWorld(ang(35,0,90)))
- holoColor(A,Color)
- holoModel(A, "models/sprops/rectangles_thin/size_1/rect_3x24x1_5.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 8
- holoCreate(A, entity():toWorld(vec(13,6.5,178)), vec(1),
- entity():toWorld(ang(-35,0,90)))
- holoColor(A, Color)
- holoModel(A, "models/sprops/rectangles_thin/size_1/rect_3x24x1_5.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 9
- holoCreate(A, entity():toWorld(vec(13,-6.5,178)), vec(1),
- entity():toWorld(ang(-35,0,90)))
- holoColor(A, Color)
- holoModel(A, "models/sprops/rectangles_thin/size_1/rect_3x24x1_5.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,Material)
- A = 10
- holoCreate(A, entity():toWorld(vec(30,0,185)), vec(1),
- entity():toWorld(ang(0,90,0)))
- holoColor(A, vec4(255,255,255,255))
- holoModel(A, "models/props_c17/pulleywheels_small01.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"")
- A = 11
- holoCreate(A, entity():toWorld(vec(-30,0,185)), vec(1),
- entity():toWorld(ang(0,90,0)))
- holoColor(A, vec4(255,255,255,255))
- holoModel(A, "models/props_c17/pulleywheels_small01.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"")
- A = 12
- holoCreate(A, entity():toWorld(vec(30,0,36)), vec(1),
- entity():toWorld(ang(0,90,0)))
- holoColor(A, vec4(255,255,255,255))
- holoModel(A, "models/props_c17/pulleywheels_small01.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"")
- A = 13
- holoCreate(A, entity():toWorld(vec(-30,0,36)), vec(1),
- entity():toWorld(ang(0,90,0)))
- holoColor(A, vec4(255,255,255,255))
- holoModel(A, "models/props_c17/pulleywheels_small01.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"")
- A = 14
- holoCreate(A, entity():toWorld(vec(30,0,185)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(36,36,36,255))
- holoModel(A, "models/sprops/geometry/fring_84.mdl")
- holoScale(A, vec(0.21,0.59,0.21))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- A = 15
- holoCreate(A, entity():toWorld(vec(-30,0,185)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(36,36,36,255))
- holoModel(A, "models/sprops/geometry/fring_84.mdl")
- holoScale(A, vec(0.21,0.59,0.21))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- A = 16
- holoCreate(A, entity():toWorld(vec(30,0,36)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(36,36,36,255))
- holoModel(A, "models/sprops/geometry/fring_84.mdl")
- holoScale(A, vec(0.21,0.59,0.21))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- A = 17
- holoCreate(A, entity():toWorld(vec(-30,0,36)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(36,36,36,255))
- holoModel(A, "models/sprops/geometry/fring_84.mdl")
- holoScale(A, vec(0.21,0.59,0.21))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- A = 18
- holoCreate(A, entity():toWorld(vec(-38,0,111)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(36,36,36,255))
- holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x144.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- A = 19
- holoCreate(A, entity():toWorld(vec(-22,0,111)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(36,36,36,255))
- holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x144.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- A = 20
- holoCreate(A, entity():toWorld(vec(38,0,111)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(36,36,36,255))
- holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x144.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- A = 21
- holoCreate(A, entity():toWorld(vec(22,0,111)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(36,36,36,255))
- holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x144.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- #Left nut
- A = 22
- holoCreate(A, entity():toWorld(vec(38,0,65)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(255,36,36,255))
- holoModel(A, "models/sprops/geometry/sphere_24.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- #Right nut
- A = 23
- holoCreate(A, entity():toWorld(vec(-38,0,65)), vec(1),
- entity():toWorld(ang(0,0,0)))
- holoColor(A, vec4(255,36,36,255))
- holoModel(A, "models/sprops/geometry/sphere_24.mdl")
- holoScale(A, vec(1,1,1))
- holoParent(A, entity())
- holoMaterial(A,"WTP/metal_2")
- }
- function number canClk() {
- return (Ball1Pos != Ball1 |Ball1Pos != Ball2)
- }
- if(canClk()){
- interval(100)
- if(clk()){
- if(Ball1Pos != Ball1) {
- Ball1Pos += Ball1Pos > Ball1 ? -0.05 : 0.05
- Ball1Pos = clamp(Ball1Pos,0,1)
- holoPos(22,entity():toWorld(vec(38,0,65+Ball1Pos*90)))
- holoAng(10,entity():toWorld(ang(0,90,-Ball1Pos*180)))
- holoAng(12,entity():toWorld(ang(0,90,-Ball1Pos*180)))
- }
- if(Ball2Pos != Ball2) {
- Ball2Pos += Ball2Pos > Ball2 ? -0.05 : 0.05
- Ball2Pos = clamp(Ball2Pos,0,1)
- holoPos(23,entity():toWorld(vec(-38,0,65+Ball2Pos*90)))
- holoAng(11,entity():toWorld(ang(0,90,Ball2Pos*180)))
- holoAng(13,entity():toWorld(ang(0,90,Ball2Pos*180)))
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement