• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Disabling health/mana regeneration temporarily

Status
Not open for further replies.
Level 3
Joined
Apr 3, 2019
Messages
48
Hello Hive,

I'm trying to make a survival type game where, if you go too long without eating food, you get a hunger debuff and 20% of your hero's health knocked off. Problem is... it just regenerates before the next timer finishes, which doesn't really go with the theme... Is there some way to disable health/mana regeneration while the debuff is active so that the unit loses 20% health each cycle? I am wondering if maybe there is a spell with an ability like that pre-programmed in, but cannot think of one. Thanks very much!
 
But that disables regeneration permanently. I just want to turn it off when the debuff is active.
Use your imagination for a moment, either you disable it this way, and when you want regeneration comes back, give the unit a regeneration ability with the about you want, OR do the opposite - have the unit with its regeneration and to "disable" regeneration give it the ability with negative regeneration.
Or in 1.31.1 you can simply
  • Unit - Set Unit: Footman 0001 <gen>'s Real Field: Hit Points Regeneration Rate ('uhpr') to Value: 50.00
 
Well, I tried the negative regeneration rate idea initially, but the unit is a hero, so its health regeneration rate is going to change as you level up/get items/etc. There doesn't seem to be any way to set something = to unit's current health regeneration.

If 1.31.1 has a regeneration feature then I'd love to upgrade, but I've heard only bad, glitchy things about it.
 
This doesn't seem to work yet (along with many other things) but it would probably be the easiest solution once it does:
  • Unit - Set Unit: YourUnit Integer Field: Hit Points Regeneration Type ('uhrt') to Value: SomeInteger
I tried setting the Value to -10 all the way to 10, but none of them worked.
You'd think it would be like 0 = None, 1 = Always, 2 = Only On Blight, 3 = Only During Day, 4 = Only During Night.
 
This doesn't seem to work yet (along with many other things) but it would probably be the easiest solution once it does:
  • Unit - Set Unit: YourUnit Integer Field: Hit Points Regeneration Type ('uhrt') to Value: SomeInteger
I tried setting the Value to -10 all the way to 10, but none of them worked.
You'd think it would be like 0 = None, 1 = Always, 2 = Only On Blight, 3 = Only During Day, 4 = Only During Night.

Yeah, I see the problem here.
Your using an integer field when it should be a real field. At least I believe that's the problem.
 
This is Hit Points Regeneration TYPE, not the actual amount regenerated. The category for this option is found under Integer, meaning you won't find it under Real or Boolean or String. Like I said, it's not working yet as far as i'm aware but hopefully with the next few patches it will be fixed.
 
I get it.

But where is there an integer value for regeneration type though? I'm guessing you'll have to set type equal to an integer to make it work (if that's possible), or just use another mildly more complex trigger that uses real variable for units standing in blight or whatever.
 
I get it.

But where is there an integer value for regeneration type though? I'm guessing you'll have to set type equal to an integer to make it work (if that's possible), or just use another mildly more complex trigger that uses real variable for units standing in blight or whatever.

Once it works (if it's even going to work) you'll most likely just set the Integer to some number between 0-4 or 1-5. There's 5 options and logically it'd make sense that Blizzard just numbered them this way. Ideally, they would make it so that you could just select Always, None, etc... without having to just guess how Blizzard ordered it.
 
Well I'd personally prefer a simple drop down bar with all options on it then an integer. But hey, at least its doable either way... which is better luck than I usually get.
 
Well I'd personally prefer a simple drop down bar with all options on it then an integer. But hey, at least its doable either way... which is better luck than I usually get.
The reason it's done this way is that the functions that change the values are generic functions rather than being specific to the field you are trying to modify. They are just xxSetRealValue() and to be standardized/consistent they take the same input parameters for all fields they can modify.
 
Status
Not open for further replies.
Back
Top