Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
MCDB On Attack

Events


Unit - A unit Takes damage

Conditions


(Level of Melee Cold Damage Bonus (Custom) for (Damage source)) Greater than 0


(Damage From Normal Attack) Equal to True

Actions


-------- First create a Dummy unit on top of the enemy unit: --------


Set VariableSet MCDB_Point = (Position of (Damage Target))


Unit - Create 1 Dummy for (Owner of (Damage source)) at MCDB_Point facing Default building facing degrees


Set VariableSet MCDB_Dummy = (Last created unit)


-------- --------


-------- Then clean up a memory leak. This is optional and only helps with map performance: --------


Custom script: call RemoveLocation( udg_MCDB_Point )


-------- --------


-------- Then remove the Dummy from the game after a short time (sometimes needs to be longer for certain abilities): --------


Unit - Add a 0.20 second Generic expiration timer to MCDB_Dummy


-------- --------


-------- Then give the Dummy the Ability you want to cast and Order it to cast it: --------


Unit - Add Frost Nova (Melee Cold Damage Bonus) to MCDB_Dummy


Unit - Order MCDB_Dummy to Undead Lich - Frost Nova (Damage Target)
What's wrong with my solution?Not sure what is happening lol, nothing seems to be working as intended. Any one able to make a unit that is melee and does cold "slow" damage and will work with cleave ability? Im a new noob at this lol!
I see now, that's why it helps to be specific, "doesn't work" to me sounds like nothing is even happening.I copied your custom melee cold damage to my hero, and cleave to where it attacks multiple units. just the primary unit that is getting attacked is slowed, but other units around are taking just damage.
(Damage From Normal Attack) Equal to True
MCDB On Attack 2

Events


Unit - A unit Takes damage

Conditions


(Level of Melee Cold Damage Bonus (Custom) for (Damage source)) Greater than 0

Actions


Set VariableSet MCDB_Should_Proc = False


-------- --------


-------- This allows it to work with Cleaving Attack which deals "enhanced" damage but doesn't "come from an attack": --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Damage From Normal Attack) Equal to True



Then - Actions




Set VariableSet MCDB_Should_Proc = True



Else - Actions




Custom script: set udg_MCDB_AttackType = BlzGetEventAttackType()




Custom script: set udg_MCDB_DamageType = BlzGetEventDamageType()




Custom script: if udg_MCDB_AttackType == ATTACK_TYPE_HERO and udg_MCDB_DamageType == DAMAGE_TYPE_ENHANCED then




Set VariableSet MCDB_Should_Proc = True




Custom script: endif


-------- --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




MCDB_Should_Proc Equal to True



Then - Actions




-------- Create the Dummy on top of the enemy unit: --------




Set VariableSet MCDB_Point = (Position of (Damage Target))




Unit - Create 1 Dummy for (Owner of (Damage source)) at MCDB_Point facing Default building facing degrees




Set VariableSet MCDB_Dummy = (Last created unit)




-------- --------




-------- This cleans up a memory leak. It's optional but helps with map performance: --------




Custom script: call RemoveLocation( udg_MCDB_Point )




-------- --------




-------- Remove the Dummy from the game after a short time (sometimes needs to be longer for certain abilities): --------




Unit - Add a 0.20 second Generic expiration timer to MCDB_Dummy




-------- --------




-------- Give it the Ability you want to cast and Order it to cast it: --------




Unit - Add Frost Nova (Melee Cold Damage Bonus) to MCDB_Dummy




Unit - Order MCDB_Dummy to Undead Lich - Frost Nova (Damage Target)



Else - Actions
Did you copy the Dummy unit as well? It sounds like you're missing something.Ive copied the triggers and both the (Melee Cold Damage Bonus) and Frost Nova that you made and the hero shows the cold frost icon but not the cleave icon like on the pitlord. When he attacks there is no cold "slow" even applied.
Understand that everything in the Object Editor is stored under a unique ID. This ID is called a Rawcode.oh no i didnt copy the dummy unit. Now i did - i copied everything from your test #2 onto a brand new map that i made to test. just used a different unit and changed it to melee.
And still nothing lol! crazy how you can copy exactly everything and it wont work
(Level of Melee Cold Damage Bonus (Custom) for (Damage source)) Greater than 0
Check where the Dummy unit is stored in the Object Editor. It's all categorized by race, Human, Orc, Undead, etc.Still not working, but think im almost there! something about where it says create unit in that window, its suppose to say dummy? where is that dummy located?
That's funny, it's because this line kills the Dummy unit after 0.20 seconds:So going back to my picture i posted a bit ago, the unit that is in red i changed that to captain and lol! Everytime he would attack he would die so the game just kept saying hero has fainted lol! Everytime he attacked!
Unit - Add a 0.20 second Generic expiration timer to MCDB_Dummy
Ability - Cast the (Frost Nova) ability on (Damage target) from (Damage source) using Ability Level: 1
No, that's not complicated. You can just give him an ability that applies Art effects, like the Item Armor bonus ability. You should be able to modify the Art - Target field and adjust the Attachment Points, "origin" works well for what you described.If i wanted to give my hero spellbreaker model an icy or frost glow or aura or effect around him? Is that more complicated to add?
You don't have to download anything, plenty of standard abilities apply art effects to the unit that has the ability.I will check that out, so just download an aura from hive workshop or there already built in aura's that I can choose from?
Also I found this frost sword on this site that I'd like to add to the spell breaker, I don't know if that's even possible to add to him? Remove that weapon or no since it's built into that model.
I added target Frost armor buff and nothing happened lol. Where would an aura be? Buffs or ? In that window?
Now give the Spellbreaker that new Devotion Aura ability. But make sure it's a non-Hero ability so he doesn't have to Learn it using Skill Points.And how would i attach the sword i downloaded from this site to the spellbreaker?
I told you exactly what type of Ability it should be and where it should go.I copied inner fire since (neutral) and added Frost armor and I added it to default unit ability. Lol idk what's going on it didn't work. Lol I think it's just me
That double bladed weapon would it remove what the spell breaker weapon has? Or?
Once you've followed ALL of those instructions you'll want to move onto these next two steps:I'll give you a simple experiment, copy and paste Devotion Aura, set it's Targets Allowed to None, set it's Armor Bonus to 0.00, and change it's Art - Target to any model you'd like, custom or not.
