Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Can anyone help me? I like to make death pact give bonus damage and bonus hp. (like the clinkz' one) Do I need to make triggers for this? I have no experience on making triggers.
It depends if you want the bonus damage and hp to be a % of the targeted unit's current hp, or if it will be static damage of some kind. The former requires either complex triggers or a system like BonusMod, but the latter can be nearly as good without requiring as much effort.
Instead of "8% current hp of target unit gained as hp and damage" you say "bonus hp and damage scales from 50+10 to 500+100 as unit target current health scales from 100 to 5500". You set a few different thresholds in the range you choose which correspond to different levels' bonuses in a modified Avatar ability that grants bonus hp+damage. I might pick 10 levels and my health range is 50 (lvl 1)->500 (lvl 10) means each level increases by (500-50)/(10-1) = 50. Note that there are 9 steps for 10 levels of spell. I get the following values:
level
hp
damage
hp threshold
1
50
10
100
2
100
2
700
3
150
30
1300
4
200
40
1900
5
250
50
2500
6
300
60
3100
7
350
70
3700
8
400
80
4300
9
450
90
4900
10
500
100
5500
Then you just store these hp threshold values in an array and compare the sacrificed unit's current hp to each value, which will determine the level at which to cast the avatar spell. Temporarily enable the ability so the unit can cast it, set the level, and order it to use avatar. You add this AvatarLikeAbility to the unit's unit ability list in the Object Editor (it should work as a unit ability not just hero), and on map initialization disable it for all players
-------- in map init trigger --------
Player Group - Pick every player in (All Players) and do (Player - Disable AvatarLikeAbility for (Picked Player))
-------- in "unit starts the effect of an ability" trigger --------
Set SacHP = Current Life of (Target unit of ability being cast)
Loop - For each (Integer A) from 1 to SacLVLS do (actions)
Loop - Actions
If conditions then actions else actions
If - Conditions
SacHP less than SacTHRESH[(Integer A)]
Then - Actions
Set SacLEV = Max((Integer A) - 1, 0)
Custom script: exitwhen true //there might be a GUI equivalent for this but IDK
Else - Actions
Player - Enable (AvatarLikeAbility) for (Owner of (Triggering Unit))
Unit - Set level of (AvatarLikeAbility) for (Triggering Unit) to SacLEV
Unit - Order (Triggering Unit) to Avatar
Player - Disable (AvatarLikeAbility) for (Owner of (Triggering Unit))
maybe disabling it that fast doesn't allow the unit to cast it, I'm not sure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.