Garry's Mod

Garry's Mod

[PR]Star Wars Medical Sweps [Bacta Grenade, Bacta Injector, Force Heal]
43 kommentarer
Raphael 22. juli kl. 11:55 
I'm not sure if you still update, but I looked into a minor issue. Whenever the max HP of a player is changed, like for an event character, the bacta injector and nade treat the player's max HP as the original, with the nade reducing the HP to the original amount (this is where event characters with 1000 HP would be brought back to 200) and the injector capping at the original max HP.

In the code, it seems the max HP that's used to calculate healing is determined when the player spawns or changes jobs, which could be good for performance, since you wouldn't need to call the ent:GetMaxHealth() method every time you try to heal someone, but it has no way of updating if the max HP does ever change. Setting up events with that in mind could just involve having someone respawn with a desired max HP, so I guess there's a way around the issue even without changing the code.

Setting ent.var to ent:GetMaxHealth() in the functions does fix this.

Thanks for the great addon!
Lunneth Arc 30. juni kl. 14:28 
Bacta particles missing textures. Definitely one of the source data packs from CS:S. Any chance anyone knows what its called?
Onion 7. dec. 2024 kl. 23:32 
[[PR]Star Wars Medical Sweps [Bacta Grenade, Bacta Injector, Force Heal]] lua/weapons/weapon_forceheal.lua:117: attempt to perform arithmetic on field 'var' (a nil value)
1. unknown - lua/weapons/weapon_forceheal.lua:117
|⁧⁧Riddick  [ophavsmand] 20. apr. 2024 kl. 16:08 
Yeah if it's just a content pack go for it
Nagisa 18. apr. 2024 kl. 12:40 
Good day,
Can I create my own add-on from your add-on? By that I mean I can take the sounds, models, materials and particles from your add-ons and put it all into an unlisted content pack. Of course without the Lua files @|⁧⁧Riddick
kamiowo 19. okt. 2022 kl. 14:29 
my bacta dont have the texture
|⁧⁧Riddick  [ophavsmand] 10. aug. 2022 kl. 12:04 
yeah sure
Sentinel 9. aug. 2022 kl. 20:38 
Hey Riddick, Do I have permission to re-upload this for my server and to credit this addon with the link going to it and you as the author.
|⁧⁧Riddick  [ophavsmand] 13. dec. 2021 kl. 20:06 
oof lol
D4KiR 10. dec. 2021 kl. 1:39 
[[PR]Star Wars Medical Sweps [Bacta Grenade, Bacta Injector, Force Heal]] lua/autorun/server/storevar.lua:16: Tried to use a NULL entity!
1. Health - [C]:-1
2. unknown - lua/autorun/server/storevar.lua:16
muscleliger 4. sep. 2021 kl. 19:21 
More specifically whats the model name for the bacta injector, i wpuld like to use it for pac3
muscleliger 4. sep. 2021 kl. 19:16 
Hi! trying to use this in pac3, what is the model name!
|⁧⁧Riddick  [ophavsmand] 11. maj 2021 kl. 13:22 
sure
Triple T 11. maj 2021 kl. 7:29 
Is it fine I upload this content to a content pack and give credit in the description? Thanks for reading.
Sch3mbo 6. feb. 2021 kl. 11:32 
In a server I play in I can heal others with Force heal, give them ammo but cant heal myself, just wondering if you knew about anything i could do
|⁧⁧Riddick  [ophavsmand] 13. jan. 2021 kl. 1:59 
since you asked go for it
Promet 11. jan. 2021 kl. 13:41 
Can I upload this addon to the content pack and give the description a link to your addon?
|⁧⁧Riddick  [ophavsmand] 1. jan. 2021 kl. 2:47 
sure go for it man
Vaughn 30. dec. 2020 kl. 4:44 
Permission to add this addon to a Content Addon full Link and Credit will be given! ;'D
SubZero112 6. juni 2020 kl. 10:25 
Does anyone know how to disable the ammo giving function on this weapon?
MrBalloons 28. mar. 2020 kl. 11:09 
The Models aren't actually there, but i like the change to the Bacta Granade! I just would like it even more if it could be able to heal NPCs.
Magne 9. aug. 2019 kl. 8:27 
Ya know the models for the stuff,
|⁧⁧Riddick  [ophavsmand] 7. aug. 2019 kl. 13:01 
what
Magne 7. aug. 2019 kl. 11:59 
Models?
Trader 19. apr. 2019 kl. 10:41 
Thanks for sharing!!!
commanderIbanez 2. mar. 2019 kl. 2:56 
I'm getting the following error:
tar_wars_medical_sweps_[bacta_grenade__bacta_injector__force_heal]_727824870/lua/weapons/weapon_bactainjector.lua:116: attempt to perform arithmetic on field 'var' (a nil value)
1. unknown - addons/[pr]star_wars_medical_sweps_[bacta_grenade__bacta_injector__force_heal]_727824870/lua/weapons/weapon_bactainjector.lua:116

Line 116 in the lua file states this:
if ( IsValid( ent ) ) then need = math.min( ent.var - ent:Health(), ent.var * .25 ) end

As this is in the section of the SWEP:PrimaryAttack() function, because of this error, you cannot heal other people. Healing yourself works fine, and perhaps too well considering that the ammo goes back to full in less than one second.
Mataim | Prism 18. juli 2018 kl. 7:26 
No healt
DazzleNegev67 3. feb. 2018 kl. 22:05 
this is fucking gay
Lily 24. jan. 2018 kl. 17:46 
so where's that update you promised on 1/10/2017 :thinking:
Centrelink Prospector 25. dec. 2017 kl. 5:20 
What is the model for this in pac3?
Necrosis 2. nov. 2017 kl. 6:28 
Any chance you can make a pack with an injecter that doesnt give ammo, only heal?
|⁧⁧Riddick  [ophavsmand] 8. okt. 2017 kl. 11:51 
@Fudall wait are you falloutRP fudall?
Servius 24. mar. 2017 kl. 11:37 
http://gtm.steamproxy.vip/workshop/filedetails/?id=889827473
Alrighty. ^The above is live. Please add as required and update your addon accordingly. Done to avoid the constent conflicts all of us keep getting msgd about.
Kowalski 22. mar. 2017 kl. 9:14 
How do we edit the health that adds it
Grant Ward 7. mar. 2017 kl. 15:06 
I hate the sound so much xD
|⁧⁧Riddick  [ophavsmand] 7. mar. 2017 kl. 13:19 
@[HN] Omega Assailant. This is intentional because frequently, in events, players run out of ammo. It is easier to make medics fill a more well rounded support role and get rid of the slow pre-election gear up time
Omega Assailant 6. mar. 2017 kl. 19:29 
There is a problem with Force Heal and Bacta Injector where if you press R it will replenish ammo for the user and whoever you're doing it to as a very fast rate.
Grant Ward 7. nov. 2016 kl. 2:45 
awesome work!
OtomCold 20. sep. 2016 kl. 15:21 
Thank you for the reply!
|⁧⁧Riddick  [ophavsmand] 20. sep. 2016 kl. 12:47 
It heals up to whatever health a player starts with. Meant for things like darkrp where certain jobs can have different amounts of health.
OtomCold 20. sep. 2016 kl. 2:12 
How much does this heal up to?
Feriy 24. juli 2016 kl. 8:49 
You! Bacta, Now!

10/10 would bacta again.
Popo Bigles 20. juli 2016 kl. 15:12 
Star wars: Republic Commando

thats where its from...