Thread: Q&A Thread
View Single Post
  #31  
Old 01-16-2019, 04:21 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by Ydiss View Post
Hey, I think this is my fourth post here. Been a member since 2009 hah.

I've started developing for THF recently and have been enjoying it loads. I'm just hitting a brick wall with this one particular (apparently non-existent) function.

I'm attempting to get the NPC's hp_regen value (I know I can modify it easily enough) but can't find the command for this anywhere on the ultimate perl reference (or anywhere else).

I checked the perl source and searched for "hp" but couldn't find it. It seems this is also the case for mana_regen, though I don't currently need that.

I want to make changes to npc regen but without a way to read/get the current value, that severely limits my ability to do anything clever with it (i.e. I can pretty much just hard code it).

What I want to do is reduce the hp_regen when players do something. Without the ability to read what it is currently, I imagine I'd need to use qglobals to track each npc's status (from spawn) and then hard code a sequence of conditions for it and that's just horrid.

I'd rather not do that. It seems literally every other editable stat for NPCs can be read except regen Am I missing something?

Any help would be amazing. Thanks.
If you're talking about inflated hp_regen rates in one of the recent source releases, make sure you are updated to the latest source as it includes a database update that resolves this issue
Reply With Quote