Show amount healed.

Grags_1977

Ultra Cool Member
Reaction score
32
I've searched high and low on the forums for a decent system that shows amount healed. But had no success.

This is a very old one I made for my Enigma map. But it's just rubbish.

Trigger:
  • Life
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Integer((Life of Unit_Hero))) - Integer_OldLife) Greater than 2
        • Then - Actions
          • Set TempPoint[12] = (Position of Unit_Hero)
          • Floating Text - Create floating text that reads (String(((Integer((Life of Unit_Hero))) - Integer_OldLife))) at TempPoint[12] with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards (Random real number between 0.00 and 360.00) degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Custom script: call RemoveLocation( udg_TempPoint[12] )
        • Else - Actions
      • Set Integer_OldLife = (Integer((Life of Unit_Hero)))


^ Garbage.

Anyone know of a decent one? Preferably one that doesn't run on a periodic trigger and most importantly, must be GUI.

EDIT: I'm not too picky about it running on a periodic trigger. I just want it to be intelligent enough to know when to show the amount healed.

EDIT2: MUI would be a major plus.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you would need to trigger it with your spells, i could make a jass system for it if you would like

EDIT: here is that jass, you can just create a trigger, click edit, convert to custom text, delete whats inside and copy this in, then use:
Trigger:
  • Custom Script: call Heal(Unit, Real Ammount)

to heal the unit you choose for the ammount you choose and create text displaying it

JASS:
library Heal
    globals
        real LastHealed
        constant real speed = 30.0 //this is the speed of the text tag
        constant real height = 30.0 //this is the starting height of the text
        constant real lifespan = 5.0//this is the max lifespan
        constant real fadepoint = 3.0//this is the time during the lifespan it will begin to fade
    endglobals
    
    function HealText takes texttag t, location l returns nothing//this function does the settings of the text
        call SetTextTagColor(t,0,255,0,0)
        call SetTextTagLifespan(t, lifespan)
        call SetTextTagFadepoint(t, fadepoint)
        call SetTextTagVelocity(t, speed, 0.0)
        call SetTextTagText(t, I2S(R2I(LastHealed)), height)
    endfunction
    
    function Heal takes unit u, real h returns nothing//this heals the unit, sets the LastHealed Variable, and creates the text
        call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_LIFE) + h)
        set udg_LastHealed = h
        local texttag t = CreateTextTag()
        local location l = GetUnitLoc(u)
        call HealText(t,l)
        set t = null
        set l = null
    endfunction
endlibrary
 

Grags_1977

Ultra Cool Member
Reaction score
32
"and most importantly, must be GUI"

:p

Thanks anyway :)

Also... If I knew the ammount, I wouldn't be aksing the question in the first place. Showing the ammount healed is not the question.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
I wonder if negative damage fires the Takes Damage trigger. If so, you could try that.
 

Grags_1977

Ultra Cool Member
Reaction score
32
1, Rejuvination.
2, Life steal on weapons.
3, And a couple of allied units have heal.
4, Pots.
 

merlinds

Member
Reaction score
15
mmm that complicates things....
jajajaa. Because for skills like "Holy Light" for example you can detect when the skill is casted and check the current life (previos the cast of the skill) and after that check the ammount of life.
Using the 3 events for this "begins casting an ability" "starts the effect of an ability" and "finish casting an ability".
For the life steal (you could trigger it) and use a damage detection system. IT can be global and work for all units but the amount of life healed can deppend on a variable setted for the unit. For example.

you have 2 swords, one have 15% of life steal and the other 30%. Every time a unit adquieres one of this items, you store in a hash table (using the key handle of the hero manipulating item) to store a real value (0.15 and 0.3).
Then in your global life steal detection, you make the units to regen life depending on the value of his unit handle of the hash table.

For pots, i think it must be manually setted by you, i mind when a unit uses a item, check if the unit has the classification of "Consumable" for example and then deppending on the item type you set the amount healed.

For rejuvenation, you make a trigger that detects the units that have the specific buff, and then run every second showing a fixed amount that you, again, manually set.

I really think it would be a lot of work :p
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
"and most importantly, must be GUI"

:p

Thanks anyway :)

lol a gui version would be like 3 triggers long, ill do one on my lunch but with this you dont even have to immitate it, all you do is when a unit is supposed to be healed do the custom script i posted, using (your unit, the ammount healed) in the parenthesis. I never realized how much easier it was to code in jass or how much more efficient it was, this runs twice as fast as the GUI version

EDIT:
Trigger:
  • Heal
    • Events
    • Conditions
    • Actions
      • Unit - Set life of Healed_Unit(set the unit healed tot his variable before you run this trigger) to (Life of Healed_Unit + Healed_Ammount(set the ammount you want to heal to this before running the trigger))
      • Set Heal_List[List_Order (integer with default value of 1)] = Healed_Ammount
      • If Then Else
        • If
          • List_Order is equal to 20
        • Then
          • Set List_Order = 1
        • Else
          • Set List_Order = List_Order + 1
      • Set Temp_Point = Position of Healed_Unit
      • Floating Text - Create Floating text at Temp_Point that reads String(Integer(Healed_Ammount) using 0, 255, 0 off set by 20 in the z direction
      • Floating Text - Set lifespan of last created floating text to 5.0 seconds
      • Floating Text - Set last created floating text to begin fading at 3.5 seconds
      • Floating Text - Set velocity of last created floating text to 30 towards 90*
      • Floating Text - Show last created floating text for all players
      • Custom Script: call RemoveLocationg(udg_Temp_Point)


Nvm it wasnt 3 triggers, but basically you trigger your healing around this, just set the ammount healed to Healed_Ammount obviously and set the target to Healed_Unit then run this trigger
This should also save the last 20 heals
 

Grags_1977

Ultra Cool Member
Reaction score
32
No offense GFreak, but displaying the amount healed is no problem and would take as little as 5 minutes to configure. My problem is getting the value "Amount_healed" I have no idea where to start. Once I have that value, from there it's a piece of cake.

I did hint at this in 2 posts ago.

Thanks anyway.


I'm starting to think forget the healing system lol.

EDIT: Merlinds some nice ideas there. Though (no offense) I'm not THAT BAD at world editor I wouldn't of thought about the long way round before posting ;)

I just wanted to know if there was a system somewhere that someone had written in GUI (GFreak!) and was easy to use etc.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you trigger that :/

any heals you want to be displayed through text i believe need to be triggered

EDIT: actually cant you do this as your event?

Trigger:
  • Events
    • Life of Unit_Hero becomes greater than Life of Unit_Hero + 1
 

Grags_1977

Ultra Cool Member
Reaction score
32
Shmeh, it doesn't matter. Thanks a lot for the replys. :)

Unfortuantily, I still can't rep you both :(
 

merlinds

Member
Reaction score
15
mmmm, what if you do it the same way yo did it with the first trigger, BUT, you do it with 2 triggers, One that runs every X amount of time, and set to variables PrevLife, and CurrentLife.
And another trigger that have all the actions you created up there, but the even will be "Game - CurrentLife becomes equal to (PrevLife + X)
You will have a trigger runing every 0.1 sec (for example) but with a very few actions and the other trigger (that has most of the actions) will run only when needed.
 
General chit-chat
Help Users
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top