Holographic Turrets - The17thDoctor - 05-11-2021
I present to you all my renewed and upgraded holographic turrets !
Like normal TSCM turrets, these will take in a vector input and aim where that vector is.
These turrets are available under shared/The17thDoctor/public/holo_turrets
In order to add weapons to the turret, just use the wire tool and wire the "Weapon" named inputs to the weapon of your choice.
Not all weapon models work so if the turret refuses your weapon, it might just be that the model isnt suitable.
In addition to all of this, these base turrets are all coded on the same base and are fully customisable. The turret code will allow you to add submaterials to the different parts.
Submaterials should be added as a table with both a material and color like such :
submaterials = {
{"mymaterial", Color(r, g, b)},
{"myothermaterial", Color(r, g, b}
{nil, Color(r, g, b)}, --Materials can be nil in which case the default one will be left.
{"yetanothermaterial"}, --Same for colors.
}
In addition, the base turret code is available for everyone to use and modify.
Those who would want to add your own turret, you can use the base turret code as a dependency and code the variables yourself like in this example file :
--@name Holographic Turret | My Awesome Turret
--@author The17thDoctor
--@class processor
--Model of the base of the turret
--@model models/props_phx/construct/metal_plate1.mdl
--@dependency STEAM_0:0:52002590 public/holo_turret/base_turret/base_turret.txt sv
--Parameters of the horizontal drive
hsettings = {
model = "models/Mechanics/gears2/bevel_36t1.mdl",
offset = Vector(0, 0, 5), --The horizontal drive's offset
angle = Angle(0, 0, 0), --The horizontal drive's angle as to point forward
gimbal = {-180, 180}, --The allowed gimbal
submaterials = {} --The submaterials, must be written as {"material", Color(r, g, b)}
--If material or color is nil, it'll assume standard submaterial / white
}
--Parameters of the vertical drive
vsettings = {
model = "models/mechanics/solid_steel/i_beam_4.mdl",
offset = Vector(0, 0, 30), --The vertical drive's offset
angle = Angle(0, 0, 0), --The vertical drive's angle as to point forward
roffset = Vector(0, 0, 0), --The rotation offset local to the chip, not the vertical drive.
gimbal = {-45, 10}, --The allowed gimbal
submaterials = {}
}
aiming_offset = Vector(0, 0, 30) --The offset relative to the chip from which the aiming process should originate.
off_angle = Angle(0, -90, 0) --The angle at which the turret rests relative to the chip
--Weapon slots, relative to the vertical drive.
weapon_slots = {
["Left Weapon"] = Vector(0, -20, 0),
["Right Weapon"] = Vector(0, 20, 0),
}
--Add an additional hologram, position and angles will be relative to the chosen drive.
AddHologram("vertical drive", Vector(-20, 0, 0), Angle(0, 90, 0), "models/mechanics/solid_steel/i_beam_4.mdl", 1)
SetupTurret()
Currently known bugs :
The aiming offset can only be used on the Z axis.
The rotation offset for the vertical drive is really unstable and does not always work.
|