Ok I figured out a way to do this, and what I did wrong. EventUnitDamage need the parentheses ().
For condition value. In map int trigger, Set variable. Entry as parent damage effect kind, CEffectDamage. Which is spell. Then use this variable as the condition value. I named the global variable DamageTypeSpell.
Trying to verify damage type via condition, you know like range, melee, splash. I can't figure this out and did search found nothing.
When having the condition in a trigger that fires on a damage event do:
CatalogFieldValueGet
entry=StringToText2(EventUnitDamageEffect)
fieldpath="Kind"
catalog=c_gameCatalogEffect
player=EventPlayer (or UnitOwner of damaging unit or any other player (better not use "all players"))
then compare if this strig is equal to "Melee", "Range", "Splash"
Edit: Why do I have to hit enter twice to avoid having one huge block of text?! :O
Because WikiCreole is aweful.
I advise you to change your Markup Type from Wiki to BBCode. The Markup type is under your reply box.
@Rushhour: Go
Wow how did you find that out... hmm... is there a list of strings for catalogs anywhere?
Ya, I still can't get this to work, the value of comparison.
Ok I figured out a way to do this, and what I did wrong. EventUnitDamage need the parentheses ().
For condition value. In map int trigger, Set variable. Entry as parent damage effect kind, CEffectDamage. Which is spell. Then use this variable as the condition value. I named the global variable DamageTypeSpell.
SetVariable(damageTypeSpell, (CatalogFieldValueGet(c_gameCatalogEffect, "CEffectDamage", "Kind", c_playerAny)))
Condition
Not
Comparison((CatalogFieldValueGet(c_gameCatalogEffect, (StringToText2(EventUnitDamageEffect())), "Kind", (UnitGetOwner((EventUnitDamageSourceUnit()))))), ==, damageTypeSpell)