• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Negative Damage as heal?

Status
Not open for further replies.
Level 5
Joined
Mar 6, 2015
Messages
130
Hello
I thought Its a good Idea to Use Negative Damage and Show it via Bribe`s DDS you know there is a Heal type Damage mentioned in System But I Wondering Why Negative Damages Acting Like Positive Damages I mean This Trigger Damages Target instead of Healing it!
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Key Finished) is stored as a Handle of (Key (Picked unit)) in Hero_Hashtable) Equal to False
    • Then - Actions
      • Set DamageEventType = DamageTypeHeal
      • Trigger - Turn off Nourish Cancel <gen>
      • Unit - Cause Nrsh_Caster to damage Nrsh_Unit, dealing (- 2.00) x (Nrsh_Heal + Nrsh_Sp)) damage of attack type Spells and damage type Normal
      • Trigger - Turn on Nourish Cancel <gen>
      • Floating Text - Create floating text that reads (String(Nrsh_Heal)) above Nrsh_Unit with Z offset 0.00, using font size 10.00, color (10.00%, 100.00%, 30.00%), and 80.00% transparency
      • Floating Text - Show (Last created floating text) for (All allies of (Owner of Nrsh_Unit))
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.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
      • Custom script: call RemoveSavedHandle(udg_Hero_Hashtable,GetHandleId(udg_Nrsh_Caster),StringHashBJ("NourishDummy"))
    • Else - Actions
Note that Nrsh_Sp is a factor For Amplifying Magic Damages But Currently its 0 because i`m Creating Base Spells First :D
Any Idea why this is happening or any idea to Use DDS to Heal a unit?
 
Level 12
Joined
Jan 2, 2016
Messages
973
Well, that's not the way it works.....
I need to see the event to be speaking for sure, but if the event is "on damage", then
you need to replace the "Cause Nrsh_Caster to damage.... bla bla bla" with "set DamageEventAmount = (-2.00)x(Nrsh_Heal + Nrsh_Sp))"

If that's not the event you are using, then you need to replace that with
"Set Life of Nrsh_Unit to (Life of Nrsh_Unit + (2.00 x (Nrsh_Heal + Nrsh_Sp))"
 
Level 5
Joined
Mar 6, 2015
Messages
130
Well, that's not the way it works.....
I need to see the event to be speaking for sure, but if the event is "on damage", then
you need to replace the "Cause Nrsh_Caster to damage.... bla bla bla" with "set DamageEventAmount = (-2.00)x(Nrsh_Heal + Nrsh_Sp))"

If that's not the event you are using, then you need to replace that with
"Set Life of Nrsh_Unit to (Life of Nrsh_Unit + (2.00 x (Nrsh_Heal + Nrsh_Sp))"

No this is Part of spell Actually a 0.03 Time interval loop I wanted to Simplify my work and Use Negative Damages as Heal so the DDS can Store it as DamageEventAmount then i Can detect if the Damage was Negative and a trigger show it with green FloatText I don`t think this method works, So I will Use Set Life Function and Showing amount of heal like what i did above or maybe there an alternative way to make DDS Detect Heals that I don`t know it
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Some Damage Detection Systems use negative damage as spell damage, so negative damage will be inverted to positive damage...
Aka, you cant heal like that.

If you want an event to heal with, you should do all your healing via one specific function that calls your self made event.
Then you have a proper heal with an event.
 
Level 10
Joined
May 21, 2006
Messages
323
In my newest project TEoP Cenarius Return http://www.hiveworkshop.com/forums/map-development-202/teop-cenarius-return-276321/ I use a pretty simple method with Bribes DDS. All damage <1.00 is spell, skill or heal. For example 0.01-0.30 = healing spells, 0.31-0.70 = spell damage and 0.70-1.00 = skill damage.

For example Stormbolt deals 0.31 damage then I can detect when a unit gets 0.31 damage and the DamageSource is Mountain King I can set the DamageEventAmount = 100.

When I want a healing spell I take a spell like Chain Lightning with 0.01 damage

So when DamageEventAmount = 0.01, DamageSource = Druid then set health of DamageTarget = +100.

This works perfectly, I can tell you, you dont need any period triggers, you can modify the damage as often as you want, you can set the levels of skills, I dont know why not all modders use this simple system to detect healing and spell/skill damage.
 
Status
Not open for further replies.
Top