Garry's Mod

Garry's Mod

165 beoordelingen
[TFA][HBW] Heat Based Weapons | Base
   
Prijs
Toevoegen aan favorieten
Toegevoegd aan favorieten
Verwijderen uit favorieten
Content Type: Addon
Addon Tags: Roleplay, Realism
Bestandsgrootte
Geplaatst op
Bijgewerkt op
2.822 MB
19 mei 2020 om 11:21
21 mei 2020 om 8:38
6 wijzigingsnotities (weergeven)

Abonneren om te downloaden
[TFA][HBW] Heat Based Weapons | Base

Omschrijving
Item is no longer supported

Heat Based Weapons | Base

Information
This addon is a modification for TFA weapons. Developed for star wars weapons but usable for any kind of TFA weapons. Its a simple to use addon wich removes the ammo of the configured weapons and replace it with an heat display. You can fire with those heat based weapons as long as the heat display doesn't reach the red status.

Weapons in the screenshots are not in this addon. This addon only adds the display for the heat status and the heat system it self. The Heat Based Clone Wars Weapons will soon follow.
How it works
If configured correctly you will find on your weapon a heat display as seen in the screenshots. You can now shoot as long as the heat display isn't showing the red status. If you reached the red status, your weapon has overheated and you must reload to cool it down.
If you wait a configured time and you are not overheated the weapon cools down it self. Or you can press reload to cool the weapon down faster.

Create a Heat Based Weapon
To create a Heat Based Weapon this base is required. Then you must only add the few lines of code into your lua of the weapon. Also you should set the ammo consuption (SWEP.Primary.AmmoConsumption) to zero.
SWEP.Primary.AmmoConsumption = 0
-- Hover Heating SWEP.isHeatBased = true -- Must be true else it won't be a Heat Based Weapon SWEP.maxHeat = 40 -- Sets the max heat of a weapon. Could be compared with his magazine SWEP.currentHeat = 0 -- Sets the start heat of the weapon usually 0 SWEP.heatStep = 1 -- Defines how many heat it should add after a shot was fired SWEP.cooldownWaiter = 1 -- Defines how long it takes after the last shot till the weapon is cooling down SWEP.cooldownStep = 1 -- Set how many heat should be removed every cooldown round -- Display Size SWEP.heatDisplayX = 0.2 SWEP.heatDisplayY = 0.2 SWEP.heatDisplayZ = 0.25 -- Display Position and Rotation SWEP.heatDisplayPos = Vector(4, 2.1, 2.8) SWEP.heatDisplayRot = Angle(-90, 83, 0) -- -- -- --
If the weapon doesn't has any View Elements. You have to add the following code and change the bone.
SWEP.VElements = { ["case"] = { type = "Model", model = "models/dolunity/heatometer/heatometer.mdl", bone = "v_dlt19_reference001", rel = "", pos = weapon.heatDisplayPos, angle = weapon.heatDisplayRot, size = Vector(weapon.heatDisplayX,weapon.heatDisplayY, weapon.heatDisplayZ), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }, ["heat"] = { type = "Model", model = "models/hunter/plates/plate025.mdl", bone = "v_dlt19_reference001", rel = "case", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(weapon.heatDisplayX * 0.6, weapon.heatDisplayY * 0.7333, weapon.heatDisplayZ * 0.1), color = Color(255, 255, 255, 255), surpresslightning = true, material = "models/debug/debugwhite" , skin = 0, bodygroup = {} } }
Create TFA attachments
If you want to have a TFA attachments which influence the heat system you have to add the following code to your attachment:
function ATTACHMENT:Attach(wep) wep.maxHeat = wep.maxHeat + 15 -- Increases the max heat of the weapon by 15 if you add the attachment to your weapon wep:Unload() end function ATTACHMENT:Detach(wep) wep.maxHeat = wep.maxHeat - 15 -- Decreases the max heat by 15 after removing the attachment wep:Unload() end

Credits
Lua Code - Me (DolUnity | STEAM_1:1:156804976)
Model - Me (DolUnity | STEAM_1:1:156804976)

Thanks to:
Stoker | Shader™ for helping me with some model questions
ChanceSphere574 for helping me with the TFA attachment compatibility and the animation

Copyright 2021 DolUnity. This item is not authorized for posting on Steam, except under the Steam account named DolUnity
Populaire discussies Alles weergeven (2)
3
18 jul 2021 om 4:32
BELANGRIJK: Suggestions
DolUnity
1
21 mei 2020 om 12:08
BELANGRIJK: TFA Weapons which support Heat Based Weapons
DolUnity
12 opmerkingen
Lunneth Arc 23 jun om 18:17 
@operator Kowalski
Yeah, just be sure to DL the TFA Star Wars Scope Fix.
Operator Kowalski 19 aug 2023 om 13:53 
does this still work?
Alkyiel 6 mrt 2022 om 11:19 
Any idea what would be stopping the overheat case from having the lights that change? everything else works perfectly fine, its just that the lights that go from green to red arent showing up.
[TGG] DoctorHeisenberg 26 feb 2022 om 5:55 
i dont see this at all in the weapons tab and i have TFA?
Clumba 7 jan 2022 om 0:55 
DolUnity, is there a plan to add a 2d overheating indicator? 3d model for multiplayer is not the best idea
SpecyJ 10 jul 2021 om 2:34 
I don't like Star Wars blasters having heat mechanics, but a heat system for TFA is perfect as there haven't been many unique sci fi weapons in TFA. This does however need some changes and optimization so it won't ruin a server.
Other than that I hope this addon can be perfected because I really want to see this applied to Halo weapons some day.
Dank 20 jun 2021 om 6:07 
The "CoolDownThinker" hook is the #1 most expensive function call on most servers, please kill it with fire lol
Anti Cheat 14 jul 2020 om 0:15 
heat-manager Top 1 server load without any Heat Based weapon on the server, nice :steamfacepalm:
TunnelSnakes_7827 24 mei 2020 om 18:57 
its a god Develeped
DolUnity  [auteur] 21 mei 2020 om 12:08