[Half-Life] Ham_TakeHealth but for armor chargers
I use Ham_TakeHealth to change capacity of wall mounted healthkit (just return 2 * health )
How to do the same with HEV chargers? I tried to use Ham_Use, but function calls much faster then armor adds to player. |
Re: [Half-Life] Ham_TakeHealth but for armor chargers
If you use HL, you have cvars for that. sk_ something. See skill.cfg
|
Re: [Half-Life] Ham_TakeHealth but for armor chargers
I can change the healthkit only.
PHP Code:
There are: PHP Code:
|
Re: [Half-Life] Ham_TakeHealth but for armor chargers
Like you can see in the HLSDK-multiplayer :
healthkit : if ( pPlayer->TakeHealth( gSkillData.healthkitCapacity, DMG_GENERIC ) ) battery : m_iJuice = static_cast<int>(gSkillData.suitchargerCapaci ty); It uses the cvars. |
Re: [Half-Life] Ham_TakeHealth but for armor chargers
Unfortunately cvar that I need is hardcoded in hlsdk.
PHP Code:
|
Re: [Half-Life] Ham_TakeHealth but for armor chargers
So, modify manually m_iJuice when the item spawn.
|
Re: [Half-Life] Ham_TakeHealth but for armor chargers
And how to do that?
Ham_TakeHealth better than changing sk_healthcharger1 because I can get double health for the same time. |
Re: [Half-Life] Ham_TakeHealth but for armor chargers
m_iJuice is an offset, the value is 62 for windows.
Hook Ham_Spawn with "func_recharge" and as post, and use set_pdata_int( entity, 62, your_new_value ); Quote:
|
Re: [Half-Life] Ham_TakeHealth but for armor chargers
Quote:
Quote:
|
Re: [Half-Life] Ham_TakeHealth but for armor chargers
I don't get, whatever you change gSkillData.healthkitCapacity or changing the param on the fly in TakeHealth, it's the same result...
|
| All times are GMT -4. The time now is 10:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.