[Solved] Bribe's Damage Engine Not Registering 1 Damage as Killing Blow

Status
Not open for further replies.
I am in the middle of a hero spawn system request I recieved earlier today. The user wants it so that the hero doesn't actually die, but instead, plays their death animation and remains there. I immediately thought of using Bribe's Damage Engine, and everything was working perfectly fine until I realized what other feature the user has in their project. Heroes in the map will have a passive Immolation that makes them take 1 damage per second. I figured that still wouldn't be a problem with the damage engine, but for whatever reason, the event's do not run when the Hero dies to the immolation. The trigger will ONLY run if I set the damage of Immolation from 1 to any number greater than 1.46.

Here is the Init trigger.


  • RS Hero Death Init
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget is A Hero) Equal to True
      • DamageEventAmount Greater than or equal to (Life of DamageEventTarget)
    • Actions
      • Set DamageEventAmount = 0.00
      • Set RS_indexMax = (RS_indexMax + 1)
      • -------- --------
      • -------- setting variables for current death instance --------
      • Set RS_heroUnit[RS_indexMax] = DamageEventTarget
      • Set RS_deathLoc[RS_indexMax] = (Position of RS_heroUnit[RS_indexMax])
      • Set RS_player[RS_indexMax] = (Owner of RS_heroUnit[RS_indexMax])
      • Unit - Order RS_heroUnit[RS_indexMax] to Stop
      • Animation - Play RS_heroUnit[RS_indexMax]'s death animation
      • Unit - Pause RS_heroUnit[RS_indexMax]
      • Unit - Make RS_heroUnit[RS_indexMax] Invulnerable
      • -------- --------
      • -------- checking if there is an instance running --------
      • -------- if so, turn loop on --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RS_indexMax Equal to 1
        • Then - Actions
          • Trigger - Turn on RS Hero Death Loop <gen>
        • Else - Actions

EDIT: Adding this conditional statement fixed it. Need to check for True or False since I need to detect and modify for any damage-type. However, I would still like an explanation to why setting the damage to any number greater than 1.46 fixed it before.
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • IsDamageSpell Equal to True
        • IsDamageSpell Equal to False

EDIT2: Bribe's suggestion is better :D
  • Conditions
    • (DamageEventTarget is A Hero) Equal to True
    • ((Life of DamageEventTarget) - DamageEventAmount) Less than or equal to 0.41
 
Last edited:
No, that conditional if does nothing. The 1.46 damage is pretty arbitrary. Also, the unit can still die if its HP is above 0. Actual death is when the HP is at 0.405. So your condition should be unitlife - damageamount < 0.41 (since 0.405 can't be entered in GUI).

Also, add a Game - text message when this trigger runs. The only time this wouldn't run is if you have some DamageEventOverride set to true.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Nullifying the damage?
So if the unit has 100 hp and I hit it for 100 dmg, then he doesnt get hit while if I only did 99 damage, he would have 1 hp left.

Me no agree-arino.

Also... to the one of that project,
I can see why it is tempting to not make the heroes die... however, it is better to do so because you would have to do so many things to make everything work with it simply because you refuse to use the revive function.
There are many ways to do what you might want to achieve but you should be taking very carefull steps when removing deaths of a unit for example.
 
Nullifying the damage?
So if the unit has 100 hp and I hit it for 100 dmg, then he doesnt get hit while if I only did 99 damage, he would have 1 hp left.

Me no agree-arino.

Also... to the one of that project,
I can see why it is tempting to not make the heroes die... however, it is better to do so because you would have to do so many things to make everything work with it simply because you refuse to use the revive function.
There are many ways to do what you might want to achieve but you should be taking very carefull steps when removing deaths of a unit for example.

Why the user wants the Hero to actually not die I do not know. I asked him if if it was okay for the Hero to die, and he said no. So Im just following his request guidelines xD
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
I know, and I dont think I can blame you for making something that someone requested...
That would be silly.

However, it often happens that people think they have a solution to their problem which actually creates lots of more problems without even solving the original problem.
Myself is included in those people.
Having good intentions is rarely enough, so I do recommend him to take a look at what he exactly wants. Because the request (as far as I know) didnt show what he was aiming for, only something that could possibly be a solution to that.
You can understand my point and pass it on to the one who asked you this favor.
 
Sorry about the slow response. I unsubscribed once Bribe gave me a fix.

Why would you give everyone immolation anyway?

To my understanding, only the Heroes will have the Immolation spell. I didn't ask for full details on his project. All I know is that he needs Heroes to be taking 1 damage per second.

And I fully agree with Wietlol here (wow, now I feel dirty :p ):
Don't code what the user wants. Code what the user needs.

Do you mind elaborating? I'm not entirely sure what is wrong with nulling the damage on a killing blow.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Situation 1:
Unit with 100 hp takes 100 dmg.
Dmg will be nullified.
Unit remains 100 hp.

Situation 2:
Unit with 100 hp takes 99 dmg.
Dmg will not be nullified.
Unit will have 1 hp.

In situation 1, the attacker is more powerfull than in situation 2.
However in situation 1, the target is unaffected by the attack.
When you are in game, you except that when a unit takes fatal damage but is prevented from dying, the unit should have 1 hp left.

However, that was not Zwiebelchen's point.
The point was that you should tell the one for who you did the request about what he wants compared to what he needs.
You created something that is of literally 0 use in the actual game.
And on top of that, this is extremely glitching as well.
You as a request taker should not make what the user wants, but rather what the user needs (as beautifully said by Zwiebelchen).
 
hello! I requested this spell/system as a part of my project ''Mur'loc Island Survival''

the reason heroes should not actually die is a lot of items im making drop on death, id like the items to stay in the heroes inventory even when he is immobilized and stuck as a ''corpse'' on the ground, awaiting his heroes ghost to resurrect himself.

but if he does not reach his corpse in time, the body dies, and all the items THEN drop because the hero is removed from the game/dead, hence all the loot gets dumped, then others can grab the loot for them selves disregarding the dead player.

but if the players hero is immobilized I don't want all that gear to be able to be stolen by other players.

im aiming for a ''world of warcraft'' style Resurrection system. built to work for wc3.
 
Inventory ability -> Drop Items On Death -> false
hmm...

Sounds like I was right and you didn't need this request at all.

well no your wrong...you don't know what I ''need'' and don't need... the idea was a re-spawn system where a ghost unit is needed to re-spawn a mur'loc heros body, the mur'loc heros corpse being your actual hero mur'loc, trapped on the ground like incapacitated heros in sc2.

the ghost then respawns the corpse by reaching it, if how ever he does not reach it in time, the mur'loc corpses items all drop onto the ground the hero him self is removed from the game and thats the end of the system really.

its hard to make such a thing work when you have no knowledge of trigger editing. I just know that when ever I tried making such a system, it ended up being really buggy.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Well... apart from that your attempts are buggy, so is your "solution" in it's current state.
It is less work to just make your hero not drop items on death than making this system work properly.

Because as far as this goes, you want to avoid your heroes from dying, but you still want (yes you do) to simulate their death and fire the default death event, for which you have to kill the hero even though you want to avoid death, which leads to that you want to revive and remove control of your hero once he dies which you have disabled by this system...

So, in fact, this solution will not work at all. Better said, it CANNOT work.
Trust me, you want your hero to die, you just don't know it yet.
 
Status
Not open for further replies.
Top