-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entropy : Zero Uprising Episode 2 Health Vial Backpack #223
Conversation
194ac42
to
b12503d
Compare
0bef18e
to
65366ff
Compare
@@ -2978,6 +2978,11 @@ CAmmoDef *GetAmmoDef() | |||
def.AddAmmoType("762mm", DMG_BULLET, TRACER_LINE_AND_WHIZ, "sk_plr_dmg_762mm", "sk_npc_dmg_762mm", "sk_max_762mm", BULLET_IMPULSE(200, 1225), 0 ); | |||
#endif | |||
|
|||
// Uprising | |||
#ifdef EZ | |||
def.AddAmmoType("item_healthvial", DMG_GENERIC, TRACER_NONE, "sk_healthvial", "sk_healthvial", "sk_healthvial_max", 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems odd to have an ammo type name exactly match an existing classname, but I can't think of any specific case in which it would cause an issue (aside from being confusing)
@@ -113,6 +119,7 @@ void CHealthKit::Precache( void ) | |||
m_nSkin = 1; | |||
|
|||
PrecacheScriptSound( pTouchSounds[ GetEZVariant() ] ); | |||
PrecacheScriptSound( "HealthVial.BackpackPickup" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This precaches whether sv_healthvial_backpack
is enabled or not. I'm assuming that's intentional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point, but if it did check sv_healthvial_backpack then the sound wouldn't be cached if the value gets changed at any point after the map has loaded
This is a feature intended for Entropy : Zero Uprising Episode 2. This pull request for Entropy : Zero 2 is a placeholder until such a time as we decide we want to implement this feature for workshop content or for other Entropy : Zero mods.
Description
The health vial backpack is a feature that allows the player to store health vials they find. With the backpack enabled, contacting a health vial will add it as an ammo type instead of doing the normal interaction. The number of health vials currently in your inventory will be displayed on a new HUD element.
Pressing a key bound to the command "impulse 28" will consume one health vial from the inventory and restore the normal number of hitpoints.
How to use
To use the health vial backpack, you must set the ConVars and make a few configuration changes to display the backpack on the HUD.
ConVars
This pull request adds two ConVars.
To use the health vial backpack, set sk_healthvial_backpack to 1. The player may hold health vials up to
sk_healthvial_max
. Please note that the HUD is only set up to handle a maximum of 8 healthvials.Key binding to consume health vial
Bind the command "impulse 28" to a key in order to use the "consume health vial" function. Please look at how "impulse 36" is handled in Entropy : Zero 2's configuration files to figure out the best way to set up a binding in the menu. For debug purposes, you can also type
bind b "impulse 28"
to bind impulse 28 to the B key.HUD config files
healthvial_backpack_scripts.zip
hudlayout.res
Add the following configurations:
hudanimations_ezu.txt
In a hudanimations file, add these events. (You could create new file hudanimations_ezu.txt and add it to the hudanimations_manifest.txt file)