Half-Life 2

Half-Life 2

85 个评价
Emergency Healing Function
   
奖励
收藏
已收藏
取消收藏
type: assets
文件大小
发表于
更新日期
16.418 KB
2024 年 11 月 23 日 上午 7:49
2024 年 11 月 23 日 上午 10:21
6 项改动说明 ( 查看 )

订阅以下载
Emergency Healing Function

描述
This is an experimental emergency healing function using a CFG file and a few spawned entities. The player will be able to use the suit's power to provide emergency healing to themselves when their HP is very low, giving them a better chance to survive and avoid getting killed by a single shot. However, it's not easy free HP, as it takes time to execute and freezes the player in place during the process, so it's not ideal in the middle of combat.

Because this alters a keybind (N) and spawns entities, I will say that you assume the risk of this breaking the game somehow if it doesn't play nicely with certain maps. But it's easy to uninstall, you simply have to unsubscribe and unbind the N key. The CFG file won't be around to rebind the key after it's been unsubscribed to.

This requires Script MultiLoader to work, so that it plays nicely with other script mods. Link is on the right side and should also pop up if you try to sub to this without subbing to that first.
SCRIPT ID: 11

So how does it work?
When you press the N key, the following happens:
  1. The N key is unbound temporarily
  2. Several entities are created
  3. The player's speed is frozen (and flashlight disabled, which is not intended but an unfortunate side effect of altering speed)
  4. The player can't move during the healing process, but they can look and shoot/swing
  5. The player will hear the suit speak, and their HP will be tested
  6. If HP is below 30, the suit will heal them 10 HP, then retest
  7. Once HP is 30 or above, the suit stops healing and takes a moment to recharge
  8. Upon recharge, the suit speaks that it's recharged, movement and flashlight is restored, and the N key is rebound
  9. Created entities are killed, and are remade every time EMS is used, to prevent duplicates

Caveats
The speedmod disables the flashlight; once speed is restored, so is the flashlight, but you have to press the flashlight keybind again. This wasn't intended, but you can imagine it as the suit power being rerouted to healing if you want.
The speedmod also freezes you in place in midair/midjump. Not intended, but can be amusing.
I don't know how it will work if you activate it while driving a vehicle or already frozen in a cutscene. Play it safe if this is a save file you care about.
This might act strangely if the healing process was underway and the player was killed during it. I'd recommend not quicksaving during - only before or after the process is done. If you do get killed partway and it messes up the keybind, typing "bind n QEMS" in console should fix it. Most importantly, don't use this emergency heal in combat, make sure you're in a safe spot first.

Can I see the full script and edit it?
Sure, you can do whatever you want with it. I'll post a discussion topic below that has the full script so you can alter it or use it in an offline CFG file.

You might find this useful if you want to make your own personal version with tweaks, such as how much health is restored, how long the freeze effect is, etc.

Credits
DaLazyRat on Gamebanana - I did not copy his script, I referenced his script as a base and built off of it. You can view his original script here: https://gamebanana.com/scripts/11871
热门讨论 查看全部(1)
0
2024 年 11 月 23 日 上午 8:11
The Script
Qwazzy
10 条留言
barnaby 4 月 6 日 上午 8:16 
hl2 if the morphine actually injected into the bloodstrean
Qwazzy  [作者] 2024 年 12 月 9 日 上午 8:22 
Yes, that's what I use at the end when I re-enable player movement. I could do it twice so they can use it while frozen in place but I don't see the need.
Obsidian Plague 2024 年 12 月 8 日 下午 11:53 
you can fire an enable flashlight input to "!player" which should still let you use the flashlight
Qwazzy  [作者] 2024 年 11 月 28 日 下午 6:06 
I don't believe so, as it doesn't turn on sv_cheats to spawn entities.
. 2024 年 11 月 28 日 下午 3:41 
does this disable achievements
esqueleto tactico 2024 年 11 月 27 日 下午 3:48 
nvm I just needed to re enter the game, cool mod
esqueleto tactico 2024 年 11 月 27 日 下午 3:43 
can you tell me how to install it? IDK what to touch and what not, and the mod description doesn't help me either with the install, it is a specific file and where it is?
A Bottle of Sriracha 2024 年 11 月 27 日 上午 10:12 
[MORPHINE, ADMINISTERED]:gordon:
Qwazzy  [作者] 2024 年 11 月 25 日 下午 6:20 
Are you referring to the “morphine administered” sound? That should be easy to do, yeah. Or am I misunderstanding?
georgegiblets 2024 年 11 月 25 日 下午 3:59 
can you make a version that administers morphine :steamhappy: