Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Dimensions_E2 [Jan]
- @inputs [Button]:number
- @outputs
- @persist [E]:entity [L_Inch, H_Inch, W_Inch, Wheel_Base, Track, Wheel_Size, Floor_Enabled]:number
- @persist [Current_Car]:string [Wheels_Enabled, Wheel_Base_Enabled, Overhang_Front, Dimension_Height]:number
- @persist [X_Axis, Z_Axis, Y_Axis, Wheel_Color, Main_Color, Floor_Color, Sphere_Color]:vector4
- @persist [Sphere_Size]:vector
- @model models/sprops/cuboids/height06/size_1/cube_6x6x6.mdl
- @trigger [Button]
- if (duped() | dupefinished()) {reset()}
- if (first()) {
- ###############
- ##Made By Jan##
- ###############
- #[
- First of all here are some things to know :
- L_Inch is Length in Inches
- H_Inch is Height in Inches
- W_Inch is Width in Inches
- Wheel_Base are the Inches between the front and the rear wheels
- Track is the space in Inches between the left and right wheel
- Dimension_Height is the space between the e2 and the Dimension holo's
- Have fun and good luck!
- ]#
- ## Current_Car. ##
- Current_Car = "CAR NAME HERE"
- ## Dimensions. ##
- L_Inch = 182.7
- H_Inch = 56.7
- W_Inch = 68.1
- Wheel_Base = 103.1
- Track = 53.1
- ## Things to enable or disable, Also some settings. ##
- Wheels_Enabled = 1
- Wheel_Base_Enabled = 1
- Wheel_Size = 25
- Dimension_Height = 0
- Sphere_Size = vec(0.65, 0.65, 0.65)
- Overhang_Front = 19
- Floor_Enabled = 1
- ## Colors. ##
- X_Axis = vec4(0, 255, 0, 255)
- Z_Axis = vec4(0, 0, 255, 255)
- Y_Axis = vec4(255, 0, 0, 255)
- Wheel_Color = vec4(0, 255, 0, 225)
- Main_Color = vec4(255, 255, 0, 0)
- Floor_Color = vec4(100, 100, 100, 200)
- Sphere_Color = vec4(0, 0, 0, 225)
- ## Do not change anything below this line, the code might break if you do change things. ##
- setName(
- "Dimensions" + "\n"
- + "Current_Car : " + Current_Car + "\n"
- + "Length : " + L_Inch + "\n"
- + "Height : " + H_Inch + "\n"
- + "Width : " + W_Inch + "\n"
- + "Track : " + Track + "\n"
- + "Wheel_Base : " + Wheel_Base + "\n"
- + "Overhang_Front : " + Overhang_Front + "\n"
- + "Wheel_Size : " + Wheel_Size + "\n"
- + "Made by : Jan"
- )
- E = entity()
- holoCreate(1, E:toWorld(vec(0, 0, H_Inch / 2 + Dimension_Height)))
- holoScale(1, vec(W_Inch / 12, L_Inch / 12, H_Inch / 12))
- holoAng(1, E:toWorld(ang(0, 0, 0)))
- holoModel(1, "models/sprops/cuboids/height12/size_1/cube_12x12x12.mdl")
- holoColor(1, Main_Color)
- holoCreate(2, E:toWorld(vec(0, L_Inch / 2, Dimension_Height)))
- holoScale(2, vec(0.75, 0.75, W_Inch / 6))
- holoAng(2, E:toWorld(ang(0, 90, 90)))
- holoModel(2, "models/sprops/cylinders/size_1/cylinder_1_5x6.mdl")
- holoColor(2, X_Axis)
- holoCreate(3, E:toWorld(vec(-W_Inch / 2, L_Inch / 2, H_Inch / 2 + Dimension_Height)))
- holoScale(3, vec(0.75, 0.75, H_Inch / 6))
- holoAng(3, E:toWorld(ang(0, 90, 0)))
- holoModel(3, "models/sprops/cylinders/size_1/cylinder_1_5x6.mdl")
- holoColor(3, Z_Axis)
- holoCreate(4, E:toWorld(vec(-W_Inch / 2, 0, Dimension_Height)))
- holoScale(4, vec(0.75, 0.75, L_Inch / 12))
- holoAng(4, E:toWorld(ang(0, 0, 90)))
- holoModel(4, "models/sprops/cylinders/size_1/cylinder_1_5x12.mdl")
- holoColor(4, Y_Axis)
- if (Floor_Enabled) {
- holoCreate(5, E:toWorld(vec(0, 0, Dimension_Height)))
- holoScale(5, vec(W_Inch / 6, L_Inch / 6, 0.5))
- holoAng(5, E:toWorld(ang(0, 0, 0)))
- holoModel(5, "models/sprops/rectangles_thin/size_1_5/rect_6x6x1_5.mdl")
- holoColor(5, Floor_Color)
- }
- holoCreate(6, E:toWorld(vec(-W_Inch / 2, L_Inch / 2, Dimension_Height)))
- holoScale(6, Sphere_Size)
- holoAng(6, E:toWorld(ang(0, 0, 0)))
- holoModel(6, "models/sprops/geometry/sphere_3.mdl")
- holoColor(6, Sphere_Color)
- holoCreate(7, E:toWorld(vec(0, L_Inch / 2, Dimension_Height)))
- holoScale(7, Sphere_Size)
- holoAng(7, E:toWorld(ang(0, 0, 0)))
- holoModel(7, "models/sprops/geometry/sphere_3.mdl")
- holoColor(7, Sphere_Color)
- holoCreate(8, E:toWorld(vec(W_Inch / 2, L_Inch / 2, Dimension_Height)))
- holoScale(8, Sphere_Size)
- holoAng(8, E:toWorld(ang(0, 0, 0)))
- holoModel(8, "models/sprops/geometry/sphere_3.mdl")
- holoColor(8, Sphere_Color)
- holoCreate(9, E:toWorld(vec(-W_Inch / 2, L_Inch / 2, H_Inch / 2 + Dimension_Height)))
- holoScale(9, Sphere_Size)
- holoAng(9, E:toWorld(ang(0, 0, 0)))
- holoModel(9, "models/sprops/geometry/sphere_3.mdl")
- holoColor(9, Sphere_Color)
- holoCreate(10, E:toWorld(vec(W_Inch / 2, L_Inch / 2, H_Inch / 2 + Dimension_Height)))
- holoScale(10, Sphere_Size)
- holoAng(10, E:toWorld(ang(0, 0, 0)))
- holoModel(10, "models/sprops/geometry/sphere_3.mdl")
- holoColor(10, Sphere_Color)
- holoCreate(11, E:toWorld(vec(-W_Inch / 2, L_Inch / 2, H_Inch + Dimension_Height)))
- holoScale(11, Sphere_Size)
- holoAng(11, E:toWorld(ang(0, 0, 0)))
- holoModel(11, "models/sprops/geometry/sphere_3.mdl")
- holoColor(11, Sphere_Color)
- holoCreate(12, E:toWorld(vec(0, L_Inch / 2, H_Inch + Dimension_Height)))
- holoScale(12, Sphere_Size)
- holoAng(12, E:toWorld(ang(0, 0, 0)))
- holoModel(12, "models/sprops/geometry/sphere_3.mdl")
- holoColor(12, Sphere_Color)
- holoCreate(13, E:toWorld(vec(W_Inch / 2, L_Inch / 2, H_Inch + Dimension_Height)))
- holoScale(13, Sphere_Size)
- holoAng(13, E:toWorld(ang(0, 0, 0)))
- holoModel(13, "models/sprops/geometry/sphere_3.mdl")
- holoColor(13, Sphere_Color)
- holoCreate(14, E:toWorld(vec(-W_Inch / 2, 0, Dimension_Height)))
- holoScale(14, Sphere_Size)
- holoAng(14, E:toWorld(ang(0, 0, 0)))
- holoModel(14, "models/sprops/geometry/sphere_3.mdl")
- holoColor(14, Sphere_Color)
- holoCreate(15, E:toWorld(vec(W_Inch / 2, 0, Dimension_Height)))
- holoScale(15, Sphere_Size)
- holoAng(15, E:toWorld(ang(0, 0, 0)))
- holoModel(15, "models/sprops/geometry/sphere_3.mdl")
- holoColor(15, Sphere_Color)
- holoCreate(16, E:toWorld(vec(-W_Inch / 2, 0, H_Inch + Dimension_Height)))
- holoScale(16, Sphere_Size)
- holoAng(16, E:toWorld(ang(0, 0, 0)))
- holoModel(16, "models/sprops/geometry/sphere_3.mdl")
- holoColor(16, Sphere_Color)
- holoCreate(17, E:toWorld(vec(W_Inch / 2, 0, H_Inch + Dimension_Height)))
- holoScale(17, Sphere_Size)
- holoAng(17, E:toWorld(ang(0, 0, 0)))
- holoModel(17, "models/sprops/geometry/sphere_3.mdl")
- holoColor(17, Sphere_Color)
- holoCreate(18, E:toWorld(vec(-W_Inch / 2, -L_Inch / 2, Dimension_Height)))
- holoScale(18, Sphere_Size)
- holoAng(18, E:toWorld(ang(0, 0, 0)))
- holoModel(18, "models/sprops/geometry/sphere_3.mdl")
- holoColor(18, Sphere_Color)
- holoCreate(19, E:toWorld(vec(0, -L_Inch / 2, Dimension_Height)))
- holoScale(19, Sphere_Size)
- holoAng(19, E:toWorld(ang(0, 0, 0)))
- holoModel(19, "models/sprops/geometry/sphere_3.mdl")
- holoColor(19, Sphere_Color)
- holoCreate(20, E:toWorld(vec(W_Inch / 2, -L_Inch / 2, Dimension_Height)))
- holoScale(20, Sphere_Size)
- holoAng(20, E:toWorld(ang(0, 0, 0)))
- holoModel(20, "models/sprops/geometry/sphere_3.mdl")
- holoColor(20, Sphere_Color)
- holoCreate(21, E:toWorld(vec(-W_Inch / 2, -L_Inch / 2, H_Inch / 2 + Dimension_Height)))
- holoScale(21, Sphere_Size)
- holoAng(21, E:toWorld(ang(0, 0, 0)))
- holoModel(21, "models/sprops/geometry/sphere_3.mdl")
- holoColor(21, Sphere_Color)
- holoCreate(22, E:toWorld(vec(W_Inch / 2, -L_Inch / 2, H_Inch / 2 + Dimension_Height)))
- holoScale(22, Sphere_Size)
- holoAng(22, E:toWorld(ang(0, 0, 0)))
- holoModel(22, "models/sprops/geometry/sphere_3.mdl")
- holoColor(22, Sphere_Color)
- holoCreate(23, E:toWorld(vec(-W_Inch / 2, -L_Inch / 2, H_Inch + Dimension_Height)))
- holoScale(23, Sphere_Size)
- holoAng(23, E:toWorld(ang(0, 0, 0)))
- holoModel(23, "models/sprops/geometry/sphere_3.mdl")
- holoColor(23, Sphere_Color)
- holoCreate(24, E:toWorld(vec(0, -L_Inch / 2, H_Inch + Dimension_Height)))
- holoScale(24, Sphere_Size)
- holoAng(24, E:toWorld(ang(0, 0, 0)))
- holoModel(24, "models/sprops/geometry/sphere_3.mdl")
- holoColor(24, Sphere_Color)
- holoCreate(25, E:toWorld(vec(W_Inch / 2, -L_Inch / 2, H_Inch + Dimension_Height)))
- holoScale(25, Sphere_Size)
- holoAng(25, E:toWorld(ang(0, 0, 0)))
- holoModel(25, "models/sprops/geometry/sphere_3.mdl")
- holoColor(25, Sphere_Color)
- if (Wheels_Enabled) {
- holoCreate(26, E:toWorld(vec(-Track / 2, ((L_Inch / 2) - Overhang_Front), (Wheel_Size / 2) + Dimension_Height)))
- holoScale(26, vec(Wheel_Size / 25))
- holoAng(26, E:toWorld(ang(0, 90, 0)))
- holoModel(26, "models/sprops/trans/wheel_d/t_wheel25.mdl")
- holoColor(26, Wheel_Color)
- holoCreate(27, E:toWorld(vec(Track / 2, ((L_Inch / 2) - Overhang_Front), (Wheel_Size / 2) + Dimension_Height)))
- holoScale(27, vec(Wheel_Size / 25))
- holoAng(27, E:toWorld(ang(0, -90, 0)))
- holoModel(27, "models/sprops/trans/wheel_d/t_wheel25.mdl")
- holoColor(27, Wheel_Color)
- holoCreate(28, E:toWorld(vec(-Track / 2, ((L_Inch / 2) - Overhang_Front) - Wheel_Base, (Wheel_Size / 2) + Dimension_Height)))
- holoScale(28, vec(Wheel_Size / 25))
- holoAng(28, E:toWorld(ang(0, 90, 0)))
- holoModel(28, "models/sprops/trans/wheel_d/t_wheel25.mdl")
- holoColor(28, Wheel_Color)
- holoCreate(29, E:toWorld(vec(Track / 2, ((L_Inch / 2) - Overhang_Front) - Wheel_Base, (Wheel_Size / 2) + Dimension_Height)))
- holoScale(29, vec(Wheel_Size / 25))
- holoAng(29, E:toWorld(ang(0, -90, 0)))
- holoModel(29, "models/sprops/trans/wheel_d/t_wheel25.mdl")
- holoColor(29, Wheel_Color)
- }
- if (Wheel_Base_Enabled) {
- holoCreate(30, E:toWorld(vec(-W_Inch / 2 + 1, ((L_Inch / 2) - Overhang_Front) - Wheel_Base/2, 0.5 + Dimension_Height)))
- holoScale(30, vec(1, 1, Wheel_Base / 6))
- holoAng(30, E:toWorld(ang(0, 0, 90)))
- holoModel(30, "models/sprops/cylinders/size_1/cylinder_1_5x6.mdl")
- holoColor(30, Wheel_Color)
- holoCreate(31, E:toWorld(vec(W_Inch / 2 - 1, ((L_Inch / 2) - Overhang_Front) - Wheel_Base/2, 0.5 + Dimension_Height)))
- holoScale(31, vec(1, 1, Wheel_Base / 6))
- holoAng(31, E:toWorld(ang(0, 0, 90)))
- holoModel(31, "models/sprops/cylinders/size_1/cylinder_1_5x6.mdl")
- holoColor(31, Wheel_Color)
- holoCreate(32, E:toWorld(vec(-W_Inch / 2 + 1, (L_Inch / 2) - Overhang_Front, 0.5 + Dimension_Height)))
- holoScale(32, Sphere_Size)
- holoAng(32, E:toWorld(ang(0, 0, 90)))
- holoModel(32, "models/sprops/geometry/sphere_3.mdl")
- holoColor(32, Sphere_Color)
- holoCreate(33, E:toWorld(vec(W_Inch / 2 - 1, (L_Inch / 2) - Overhang_Front, 0.5 + Dimension_Height)))
- holoScale(33, Sphere_Size)
- holoAng(33, E:toWorld(ang(0, 0, 90)))
- holoModel(33, "models/sprops/geometry/sphere_3.mdl")
- holoColor(33, Sphere_Color)
- holoCreate(34, E:toWorld(vec(-W_Inch / 2 + 1, ((L_Inch / 2) - Overhang_Front) - Wheel_Base, 0.5 + Dimension_Height)))
- holoScale(34, Sphere_Size)
- holoAng(34, E:toWorld(ang(0, 0, 90)))
- holoModel(34, "models/sprops/geometry/sphere_3.mdl")
- holoColor(34, Sphere_Color)
- holoCreate(35, E:toWorld(vec(W_Inch / 2 - 1, ((L_Inch / 2) - Overhang_Front) - Wheel_Base, 0.5 + Dimension_Height)))
- holoScale(35, Sphere_Size)
- holoAng(35, E:toWorld(ang(0, 0, 90)))
- holoModel(35, "models/sprops/geometry/sphere_3.mdl")
- holoColor(35, Sphere_Color)
- }
- for (I = 1, 35) {holoParent(I, E),
- holoMaterial(I, "lights/white")
- }
- for (I = 26, 29) {holoBodygroup(I, 1, 3)}
- }
- if (Button) {holoAlpha(1, 0)}
- if (!Button) {holoColor(1, Main_Color)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement