- Joined
- Sep 9, 2007
- Messages
- 253
I was working on this issue about 1 year ago and I had made some progress but the topic was closed so to ask for more help I have to create new topic.
Here is the old one even though I will clearly post my problem here. http://www.hiveworkshop.com/forums/requests-341/complex-ability-request-212761/
The ability I want So I have a Hero unit, a Warlock. She is able to summon a Demon which she can use to tank damage. I want to link the HP of the warlock and the Demon so that they are always at the same percentage of HP. So if the Demon takes a hit which does 10% of HP then the warlock should also lose 10% of her HP. They should also regen HP at the same rate (as a percentage).
So what's the point of using the Demon to tank damage if they both take the damage? well the idea is that the Demon will have more HP and armour than the Warlock. This means that it would be beneficial to have the Demon tank the damage.
This is what I have so far
I am using Bribe's Damage Detection System.
HeroSpecific[4] is the warlock, this is set when the warlock is chosen at the start of the game. there will only be one warlock so there is no need for MUI.
HeroSpecific[13] is the Demon, this is set each time he is summoned.
The problem Depending on what type of unit the demon and warlock are fighting there will be different outcomes. Usually it works well but it often doesn't. Sometimes I s the demon take damage but then it's health will jump back almost immediately. Other times it doesn't take damage. He also seems to have more damage reduction than I expect, I have triple checked my values in armour and attack bonuses in gameplay constants.
Any help would be greatly appreciated. I think my problem most likely stems from a lack of understanding of Bribe's Damage detection system.
Here is the old one even though I will clearly post my problem here. http://www.hiveworkshop.com/forums/requests-341/complex-ability-request-212761/
The ability I want So I have a Hero unit, a Warlock. She is able to summon a Demon which she can use to tank damage. I want to link the HP of the warlock and the Demon so that they are always at the same percentage of HP. So if the Demon takes a hit which does 10% of HP then the warlock should also lose 10% of her HP. They should also regen HP at the same rate (as a percentage).
So what's the point of using the Demon to tank damage if they both take the damage? well the idea is that the Demon will have more HP and armour than the Warlock. This means that it would be beneficial to have the Demon tank the damage.
This is what I have so far
I am using Bribe's Damage Detection System.
HeroSpecific[4] is the warlock, this is set when the warlock is chosen at the start of the game. there will only be one warlock so there is no need for MUI.
HeroSpecific[13] is the Demon, this is set each time he is summoned.
-
Demon Summoned
-
Events
- Unit - A unit Spawns a summoned unit
-
Conditions
- (Unit-type of (Summoning unit)) Equal to Warlock
-
Actions
- Set HeroSpecific[13] = (Summoned unit)
- Unit Group - Add HeroSpecific[13] to Hero_UnitGroup
- Set TempUnit = (Summoning unit)
- Set Demon_summoned = True
- Unit - Add W Unsummon Demonic Pact (Dummy) to aaTempUnit
- Unit - Set level of W Unsummon Demonic Pact (Dummy) for aaTempUnit to (Level of W Demonic Pact for aaTempUnit)
- Unit - Remove W Demonic Pact from aaTempUnit
- Trigger - Turn on Tethered Soul <gen>
- Trigger - Turn on Tethered Soul regen update <gen>
- Trigger - Turn on Tethered Soul death <gen>
-
Events
-
Demon unsummon
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to W Unsummon Demonic Pact (Dummy)
-
Actions
- Unit - Add W Demonic Pact to HeroSpecific[4]
- Unit - Set level of W Demonic Pact for HeroSpecific[4] to (Level of W Unsummon Demonic Pact (Dummy) for HeroSpecific[4])
- Unit - Remove W Unsummon Demonic Pact (Dummy) from HeroSpecific[4]
- Trigger - Turn off Tethered Soul <gen>
- Trigger - Turn off Tethered Soul regen update <gen>
- Trigger - Turn off Tethered Soul death <gen>
- Unit Group - Remove HeroSpecific[13] from Hero_UnitGroup
- Unit - Kill HeroSpecific[13]
-
Events
-
Tethered Soul
-
Events
- Game - DamageEvent becomes Equal to 1.00
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- DamageEventTarget Equal to HeroSpecific[4]
- DamageEventTarget Equal to HeroSpecific[13]
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DamageEventTarget Equal to HeroSpecific[4]
-
Then - Actions
- Unit - Set life of HeroSpecific[13] to (Percentage life of HeroSpecific[4])%
-
Else - Actions
- Unit - Set life of HeroSpecific[13] to (Percentage life of HeroSpecific[4])% (This action is currently disabled, I was using it to update the Demon's health to the right amount, this accounts for any HP regeneration which occurs immediately before the trigger)
- Trigger - Turn off DamageEventTrigger
- Unit - Cause DamageEventSource to damage DamageEventTarget, dealing DamageEventAmount damage of attack type Chaos and damage type Normal
- Trigger - Turn on DamageEventTrigger
- Unit - Set life of HeroSpecific[4] to (Percentage life of HeroSpecific[13])%
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Tethered Soul regen update
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
- Unit - Set life of HeroSpecific[13] to (Percentage life of HeroSpecific[4])%
-
Events
-
Tethered Soul death
-
Events
- Unit - A unit Dies
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Triggering unit) Equal to HeroSpecific[4]
- (Triggering unit) Equal to HeroSpecific[13]
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
- Set Demon_summoned = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Triggering unit)) Equal to Warlock
-
Then - Actions
- Unit Group - Remove HeroSpecific[13] from Hero_UnitGroup
- Unit - Remove HeroSpecific[13] from the game
-
Else - Actions
- Unit - Add W Demonic Pact to HeroSpecific[4]
- Unit - Set level of W Demonic Pact for HeroSpecific[4] to (Level of W Unsummon Demonic Pact (Dummy) for HeroSpecific[4])
- Unit - Remove W Unsummon Demonic Pact (Dummy) from HeroSpecific[4]
- Unit - Kill HeroSpecific[4]
-
If - Conditions
- Trigger - Turn off Tethered Soul <gen>
- Trigger - Turn off Tethered Soul regen update <gen>
- Trigger - Turn off (This trigger)
-
Events
Any help would be greatly appreciated. I think my problem most likely stems from a lack of understanding of Bribe's Damage detection system.
Last edited: