Pre-Heal System

Endless_Trev

New Member
Reaction score
5
Hey guys something I've been wondering about, is there a system available that heals a unit of the damage is it about to take, before it takes it? An example is in dota, where a spell makes a unit unkillable for 5 seconds, so if it is on 1 hp, it can still get hit by spells and attacks, it just takes no damage. The only way to work this I see, is to heal for the damage before it occurs, as if the heal occurs after damage is dealt it might not work, i.e if you are on 1 hp, get hit for 100, then healed for 100, you still die.

Tl;dr, is there any pre-heal system available anywhere, I cant seem to find one.
 

DuelPlayer

Member
Reaction score
21
just use the trigger set hp (something) + (something)
And btw pre-heal will also fail
If you are in full life, then you use pre-heal.
It will still be full life yet take damage without any healing
For example max life is 500 then u take 100 damage so its
Pre-heal : 500 + 100 = 500 (due to max life)
Then Damage : 500 - 100 = 400


_______________________________________________________________

Most Unpopular Project:
 

Endless_Trev

New Member
Reaction score
5
I can see what you're saying, but I'd rather have a preheal if i can, since someone taking a bit of damage if they're at full hp is not too irritating, however people dying when when they're supposed to be unkillable is well... I'm sure you can see the problem there. So, anyone else got any ideas? I'm assuming the damage detection system by weep can't really be used, as the damage is detected as the unit takes it, so it cant be healed before hand.
 

DuelPlayer

Member
Reaction score
21
Actually set life should work. Because i heard people say before, that triggers work faster and before damage is done, you can try

_______________________________________________________________

Most Unpopular Project:
 

Endless_Trev

New Member
Reaction score
5
Wow yeah it works tyvm +rep for sure, I just cant believe it recognises the damage dealt before its dealt o_0
 

Viikuna

No Marlo no game.
Reaction score
265
This is basicly how its done:


When unit takes damage, you add some +10000 health ability to it, in order to prevent it from dying. You also save all the needed data about damage dealt and grab the data about damage blocking thingies.

Then you start a 0sec timer, which calls a function, which removes this "death prevention" ability, and modifys units health so that it looks like damage got blocked.

This works because damage is actually taken after the event is triggered. 0 sec timer is used to wait a lil bit, so the damage is actually dealt.

Also you should trigger all your damage effects. For example, you dont wanna run any life steal code for blocked damage, because that damage wasnt really made. ( In DotA for example, you get healed by life stealing, even if damage was blocked, which kinda sucks balls. Do not make the same mistake. )
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top